Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Well, today has been a pretty productive day for me. I was able to implement the code that allows the Alien ships and Fighter ships to attack the Traders, as well as the code for the Alien ships to attack the Fighter Colony ships. The player has a check box on the screen that allows them to turn trader killing on and off. I also added game speeds to the game and to the in game menu. While testing the new interactions between ships, I added those labels beneath the Small and Big Alien purchase buttons so that I could keep track of how many ships were present in the game. Those will not be in the final version.


While writing the code for the various ship interactions, I realized that I have coded things in a pretty bad way. I have to have a method in the game model for each different action, so there is one method for alienAttacksTrader, alienAttacksColony, fighterAttacksAlien, and so on. Along the way I tried to change these into something more generic, but it did not work out.

This is one of those times where writing this code took very little time, but extending it to add new ships to the game will be very difficult as a result. I think that this is one of those types of games where an ECS system would be very beneficial. Unfortunately I do not have time to rewrite everything, and I am not familiar enough with implementing ECS to accomplish it. Luckily, I only have two more types of ships to implement (Big Aliens, and Trader Cruisers) so having a few redundant methods is really not a big deal.