Bug fixes, steam checks, and achievements oh my!

Today is a half day as I am prepping the house for my wife’s birthday. Had a few small items on the todo list, which is good because I only had a few hours of work.

Bugs

  • Only 1 major bug today, which was the fade screen. This is a UI black image with an attached canvas group that uses a coroutine to fade the alpha up to 1 and back down to 0 for scene transitions. If the player made a menu selection before the fade in, it would break the script. This is because I wrote this one super early on, and I did a very bad job with it. The new code is a little less clean but protects against player input breaking the script. Happy this one is done as it has been on the list for months. I goofed around for a bit with the idea of a proper “loading screen” but decided the fast fade to black was nice and clean and in matching with the aesthetic. If I am feeling adventurous I might look into doing a VHS static/tracking error transition.
  • Minor bug that was producing a non-game-breaking error. This was a colliding sphere on the shooting enemy death explosion that was left over from when I thought about have the background particles react to explosions (too resource intensive). The sphere’s code had the collider grow far too large for the game to handle. Disabling the sphere solved the issue.

Steam

  • Reset all achievements for testing purposes
  • added some checks to see if steam is running
    • if the app launches without steam, or a steam_appid.txt files it will close the game and attempt a launch through steam.
    • if the app detects a steam_appid.txt file it will try and delete the file.
    • If it cannot delete the file it will end the application.
    • If it can delete the file, and then run another steam check successfully, the game will continue.
    • If the Steamworks.net does not initialize properly, it will end the game.
    • These checks are not to protect against piracy, but to ensure my code works properly as it is far easier to say “The game cannot run without Steam (it can still run in offline mode)” than to plan for situations where the app is launched on its own. As far as DRM goes, this would be pretty damn easy to circumvent.

General clean-up

  • Got sick of the hundreds of debug lines I had put into the game constantly popping up, commented them all out (for the most part)
  • Started adding regions to the code for easy viewing later

On Monday I will continue to general clean-up of the code as well as start testing the steam build depots and cloud storage. Now I have to go pick up an 8ft inflatable unicorn (that sprays water out of its horn) from the post office for my wife’s birthday. She really wanted one… and so did I.