High Scores are back, galaxies, and code organization


I've made several changes to Fasteroids recently despite being extremely busy at work and home. It's not completely apparent in this screenshot but there's a fine navy-coloured fog in the background. Perhaps the biggest change is the re-introduction of a high score (top right). For now it's just a single stored high score, and at the moment it's not fully implemented, but it is stored in an encrypted form, so it won't be as easy to edit as the old .ini file I used in an early version of Fasteroids.

I cleaned up a lot of code and used the #region #endregion tags to wrap a lot of code. I comment my code, but adding regions should further clarify what groups of code do, and let me hide code when I need more screen space (which I feel weird saying since I'm working on a 24" monitor).

None of this is committed to itch.io yet, but I learned my lesson last night when all of Fasteroids became corrupted after my development computer spontaneously rebooted on me when I tried compiling during a Twitch stream. It underscored the fact that I need a better power supply in this machine (think I have a Corsair CX430, which isn't recommended for the NVidia GeForce 650Ti Boost card in this machine). I don't have the funds at the moment for a new power supply, but as long as I don't try to stream development again the machine probably won't spontaneously reboot on me.

I tried git refresh, but the compile error I was getting continued. Luckily the night before I committed all changes to bitbucket, so I was able to start fresh and pull the code from up to the evening before from bitbucket. I've really been struggling with ds_maps. I found pixelated pope's "simple" example too complicated to follow for this simpler example - take a score, save it, load it again. Initially thought it was my ds_map code that caused the corruption of fasteroids. But after pasting it into a new project I discovered that the code compiled just fine. (At that point fasteroids wouldn't compile, wouldn't spit out any errors in the Output window). The reload from previous days work saved me (thanks git and bitbucket).

The ds_map code I wrote kind of worked, and then didn't work. I posted in the GMS forums and got a RTFM for ds_map_secure_load and that's when I realized the mistake I made (ds_map_secure_save apparently doesn't need a variable in front of it, but ds_map_secure_load does). I still may be missing something, but at least the file is getting created and storing the proper value (and in game it updates when you pass the high score).

With family sick I may not update again until after the weekend. Hopefully I can get something new out soon for testing.

Get Fasteroids

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.