For this weekâ€™s Thousander Club update:
Game Hours: 262.25 (previous year) + 128.25 (current year) = 390.5 / 1000
Game Ideas: 616 (previous year) + 57 (current year) = 673 / 1000
I still have a 10-minute build process, which means I go from checking out the Killer Kittens project to a distributable tar.gz file in about 10 minutes. I spent this past week continuing the work of refactoring the menu system. I had plenty of opportunities for refactoring as there was a lot of code duplication in the menus. I still want to get rid of the individual menu classes since the only difference between them is the creation of different MenuOptions. For instance, MainMenu offers the options “PLAY A NEW GAME” and “EXIT”, while PauseMenu offers the options “RESUME GAME” and “RETURN TO MAIN MENU”. Instead of individual classes deriving from a Menu class, I should be able to load these menus from config files.
Of course, reducing these menus into config files would be nice, but what I currently have is a huge improvement over what I had last week. I was able to add a couple of new menus easily. Previously, adding a menu would be a big ordeal. I’d have to touch code in maybe four different files and then test the game multiple times to verify that my input handling worked as expected. I used to have problems with hitting ESC to pause the game, only to have the menu system think that the pause menu should be closed again. It thought I had hit ESC twice since I had to indicate that the button was being pressed BEFORE the menu system’s input handler was working. Since I had code duplication, I had code changes in some classes and not in others. Now, the input system works no matter what, and each menu is handled consistently. A new menu will be handled the same exact way every other menu is handled.
While I may be spending too much time on this system, I feel that the player will appreciate not feeling like the game is buggy or broken. Hitting ESC at any menu has a default option now. If you hit ESC at the MainMenu, it will open up the new VerifyMenu that asks if you are sure you want to exit. Hitting ESC at this menu will bring you back to the MainMenu. The best part is that my next project won’t have to reinvent a menu system, or if I do rewrite one, I will have enough experience to know what kinds of things I need.
It should be much easier for me to create an instructions screen now since it is basically just a menu with a background of instructions and a single option: “Play the Game”. It should also be easier to add a new feature to the menu system. I want a slider to allow the player to change the sound volume. Since the menu system’s code is much cleaner and easier to manage, implementing new features means I have less to worry about going wrong. I still need to think about creating a EULA for my game data, and I would like to get my main build system setup to build both a Gnu/Linux distributable and a Win32 distributable. Perhaps more important is updating the graphics. Maybe one day I will make a game themed on programmer art, but I need something better than a blue background with a green bar at the bottom to represent the sky and the ground. B-)