Final Touches: Taking on Rematching and Termites

 Final Touches: Taking on Rematching and Termites

Author: Sean Jamelarin
Posted on 9/24
/23

  The problem:

    In the last week of production, I attempted to really push myself to finish the game on a high note, with the full implementation of rematching a player, and fixing a 3-month long bug with our buildings. I was unable to achieve my idealized version of this game, and I will only be satisfied with putting my best foot forward and making one final push to make what this game already is the best version it can be.

    The Solution:

   In order to create the ability to rematch, I needed a way to overlook the entire game session, and a place that can store important information about the game state, like if one player had already clicked the rematching button, but another had not. I used Unreal's GameState class to get the functionality I needed to implement the logic. Another thing: I realized that I did not have to destroy the online session when rematching and restarting the game map, I only needed the host to Server Travel, and Unreal took care of the prickly parts for me. I'm still finding some way to fix our most heinous bug for our buildings - when creating and spawning an actor, only the server-side ever gets initialized. This doesn't seem so bad, until I realized with horror that in my pursuit for the rematching functionality, I reintroduced a bug that ground us to a halt 2 months ago.





Here's a brief overview of work done:

1. Created a GameState to hold information of when people hit the rematch button, and logic inside the WinGameWidget and LoseGameWidget to restart the level after both parties hit Rematch.

2. Created a PlayerState to try and fix "The Bug" (it didn't work)

3. Research and visual debugging to find culprit code


TODO:

    After this, I'll be taking a bit of a breather. I've been up over 36 hours with less than 3 hours in sleep. I think the building bug might be a little easier to beat, now that I stepped away from it for a while; Like, almost trivial. I only hope it doesn't prove to be the bane of my existence again.

Comments

Popular Posts