Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Took a couple days off, but today I put in some time working on the last bits of core gameplay that I have planned for the game jam release.

Unfortunately I was absolutely right that my approach was bad when it came to the ships in the game. Today I added the Big Alien and the Trader Cruiser ships. The idea behind the Big Alien is that it is the ranged ship for the aliens faction. The Trader Cruiser is the attack ship for the traders faction. In addition to adding these ships, I also had to add to the AI for the Fighter Ship and the Alien ships in order to make them able to attack the new ships.

What I faced here was a combinatorial explosion of methods. Because I did not succeed in making this part of the game generic, I needed to program a method for each possible outcome. Therefore, I needed methods for alienAttackedTraderCruiser, bigAlienShotTraderCruiser, fighterShotBigAlien, fighterShotTraderCruiser, etc etc for every possible combination of things that was now possible due to the new ships.

This was pretty much a nightmare, and took a few hours of my time to finish coding and testing. I'm sure that some kind of entity component system would have helped clean up this code dramatically, but I will have to go back through the code and rewrite it after the game jam is complete. I'm not totally sure yet how I would wire things up, because some of these methods are actually very different from each other. For example, some ships have health that is depleted first before they are destroyed, and different sounds, animations, and images are used depending on who is shooting and who is dying.

I decided to finish things in the inefficient way because I knew that I did not have enough time to rewrite everything with a better design. Everything in programming is a trade off, and there are always a million different ways to do things, so I think in this case I think it is forgivable. I still feed bad, though.

I have a laundry list of things left to complete before I will be happy with the game. I need a tutorial and help system, I need to finish adding the universe features and give them proper names, I need to add a save system for the game, and I need to polish up some of the existing elements. Crunch time!