Capstone - Semester 2 Week 13

By: James Keats | 19 April 2018

This is the home stretch!

Today we picked up our caps and gowns for graduation. I’ve officially signed a lease for an apartment near my new full-time position. The days are simply ticking down until not just Senior Production, but college as a whole is over. What a crazy journey it’s been. If, during my first year orientation in August of 2014, you had asked me where I thought I would be at the end of April my senior year, there are so many things I would never have guessed. My time at Champlain has been a wild, incredible ride. It’s hard to believe it’s really almost over. Last night was my final performance at The Grind Open Mic, a venue I’ve attended almost every Wednesday night since starting school. Soon, I’ll give my last tour of campus, push my last commit to the re[Mod] repo, and submit my last ever final project. Crazy.

Next week I’ll be able to post our trailer which will really highlight all the progress that we’ve made this semester. In the meantime, the past week for me has been spent fixing bugs. There were some minor ones and some major ones that have haunted us for quite some time, and they seem to all be taken care of now. Some bugs that we squashed this past week:

  • The “never die” bug, where seemingly random null reference exception caused the server to lose the ability to respawn people. Through a long trail of logging, debugging, and running session after session of the game, I eventually was able to determine that it was because the “OnExit” function for a state class inside a state machine wasn’t called when a MonoBehaviour’s OnDestroy function was called and, as a result, was not cleaned up correctly and remained registered as an event listener. When a new game was started on a machine that was previously a host, we would attempt to access objects that no longer existed from the previous game.

  • We fixed a bug where players own heads blocked their bullets if they looked straight up while shooting. This also fixed a bug where players couldn’t shoot hitscan weapons through their own riot shields.

  • Fixed an issue where the rocket booster’s effect would cancel out if you equipped one with another one already equipped. This was a result of the new booster’s Start function being called before the old one’s OnDestroy; as a result, the movement code caught a “EquipBooster” event and then the “UnequipBooster” event. The solution was simply to delay the equip event broadcast by a frame.

  • Fixed a bug where players would die multiple times from a single death. This happened often with environment deaths and with deaths from explosive projectiles. Through debugging and logging, I was able to determine that the cause was the server killing the player and “respawning them” by resetting their health, but the player’s position update lagging slightly, resulting in another death after the health was reset. At first I wasn’t sure what a clean solution to this would be. Luckily, I realized that the server was already keeping track of death times in its log for determining things like kill streaks and beyond-the-grave kills. The solution, therefore, was a little hacky but effective: the server would ignore the player claiming that it died until the server knew its respawn time was mostly over, and instead the server would simply tell it to refill its health directly.

  • Finally, we also fixed several visual bugs with particle systems and visual effects

Back to blog