Wow, what a week of development!
According to my trello board I knocked out 12 major multiplayer blocking issues. These are big issues like “Players don’t respawn in multiplayer” and “Server doesn’t create AI” and the most fun, “Server is spammed to death with audio errors”. Nice to be able to stop those 3.5GB logs files from building up 😉
In that regard, multiplayer is now about as stable as the current released version. Which is nice, considering the massive changes I made. From here on out, it will just be making it better!
Funny enough, I did a lot of performance tuning on the server and it revealed a whole host of race condition bugs. By FAR the biggest issue I have been dealing with the entire development of MAV is that damage is calculated and applied in a separate ‘thread’ than the rest of the game runs in. Damage is calculated with physics, which makes sense because that is when things hit each other. Easy enough. The issue though, is everything else is calculated when the game is rendered to the scene. There are many complicated reasons why these things don’t happen at the same time, but the short of it is, you don’t want them to be locked together, trust me on that. So what’s the problem? The physics update can happen at any point in time. ANY POINT IN TIME! Let’s think about that. Want the AI to select a target? What if that target dies in the middle of your target selection code!? Well just check for that before doing the target selection, right? NOPE, cause the physics code COULD run between the check and the actual selection and BOOM, null reference error.
This cycle has been the bane of my code and I was dumb and couldn’t figure it out and how to solve it. Finally, I just sat down and hammered out a way to cache the damage from the physics update and hold it until after the frame update had happened. Simple in concept, but wasn’t the easiest in code to do! I don’t want to claim the issue as solved, but in testing it has reduced the possibility of errors significantly. Less errors means more stable code!
I also tracked down and fixed a lot of tiny little things that don’t seem like a big deal, but were really bugging me and making the game feel unpolished. Example, the server listing would blink all the server buttons every time the listing updated. This annoyed me and felt bad. So I tracked it down, found a bunch of stuff that would have been bad also, and got it all fixed up! Fun!
Now I am mainly focused on some simple game flow stuff still broken in multiplayer, like you not seeing the MAV disabled banner, not getting your full XP rewards in multiplayer, and not getting the team screen at the end of the match. After that I will move on to more fun items, like quiting a match and rejoining, joining a siege match in progress, and muzzle flashes and sounds being off in spectator mode. Server stability and optimization is always a priority while doing this as well.
Also! VERY IMPORTANT! The twitch channel has changed! Go to http://twitch.tv/Bombdogstudios and follow. The old channel will eventually stop broadcasting or be reserved for less ‘official’ streams.
See you next week!