It’s been a while since I updated. To be honest, I don’t exactly remember all changes I’ve made. I’ve been working on it here and there in spare moments amongst busy times.
Many things have been refactored; I undid some unnecessary future-proofing I did in the previous update’s refactoring because it was silly and hard to read. I abstracted out some classes, either as their own files or as subclasses, making some code much easier to read. Again, not much has visibly changed with this new build, but I’m really happy with the progress I’ve made.
The GameController class was kind of a mess before, doing too many things. I abstracted the UI and hazard spawning into nested subclasses. They’re not used anywhere else, but the code is so much cleaner now. It turns out that the Unity space shooter tutorial is good at teaching you how to use the engine, but it’s not the best C# code ever. I needed it to be better so that I can add the functionality I need to achieve my goals with this game.
Another thing I specifically targeted with this refactor is how I’m handling the phonics data. I now have custom classes for phonemes and letters. Anything related to phonics is now in a special EnglishPhonics namespace.
Speaking of namespaces, I also have a namespace specifically for classes aimed at managing the game. There are also sub-namespaces for text constants (like Unity tag names and file paths) and level handling.
I’m not really happy with how level data is handled. Right now I have a public static class that isn’t even a singleton holding the current level data. Additionally, there are public static classes for phoneme and letter data and level presets. I need to figure out a good way to write all that crap to files. Until I do that, though, I still have a system that at least works.
See What You Can See
There are only two visible changes to the game. One is that the disruptor now supports three phonemes and therefore uses three colors. The other is that there are multiple panels to the start menu and everything slides in and out of the screen. The latter is not a critical feature by any stretch of the imagination, but it was something I could implement in a short amount of time. It’s also a little wonky at times.