Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

After setting up the foundation for the three factions AIs, and establishing all of the base components of the game (ships for each faction, and a way for each faction to capture planets and gain resources), I went back to polishing some UI related elements of the game.

Enable/Disable Sound and Music

I wanted to make it so that sound and music can be enabled and disabled. This may seem straightforward at first, but there are some edge cases that complicate things somewhat.

First of all, I believe it is important to have sound disabled by default in the HTML build, because someone browsing to your website is definitely not expecting music and sounds to start blaring out of their speakers. To deal with this I added some checks for whether the current ApplicationType is WebGL, and if so, I disable all sounds at the start.

Second, I wanted to make sure that player settings were saved between sessions in the non HTML versions of the game. If a player disables the sound or music, the odds are very good that they want those settings to stay without having to set them every time they play the game. To accomplish this, I implemented a UserData class that saves the version number and the settings for sound and music to a text file, and a UserData object is created from that text file each time the game runs.

Player Flags

For the player to control the aliens they place flags on the map and the aliens move to them. There are three of these flags, and when the player places one the last one previously placed is moved to the new location. From the beginning I wanted to implement a way to enable and disable these flags so that the player could have 1 or 2 flags instead of 3 if they wanted to.

It took quite a bit of bug fixing but I finally got this implemented. The biggest problem was that when a flag was moved, I was removing it from the array and adding it to the end of the array so that the first flag in the array was always the last one placed. Unfortunately, for simplicity I was using an integer when the flag button was pressed, so when the flag was removed from the array and added to the end the buttons on the screen did not match the indexes of the flags in the array. So I had to change the way I was doing things.

Here is a short gif of the flag system in action:

The flag buttons are implemented with a custom CheckBox object that pairs a CheckBox and an Image together in a Stack which is then added to the relevant Table.

Polishing Up

Today I really wanted to dive into the major chunk of gameplay that still needs to be completed, but I didn't have time. Instead, I added some more polish to the game. I added a pause button, and I made sure to make it so that the player can issue commands while the game is paused. This way when things get really crazy in the late game they can pause and issue orders, and then unpause and watch things unfold. If this was not possible then the AI would have a huge advantage.

I also added colors for the flags so that it is easier to tell which one is which. Unfortunately the colors are still not perfect so I probably need to make a greyscale version of the flag animation so that they look better when colorized.

I added colors to the different homeworlds as well so that there is some kind of visual indicator of which planet is the homeworld for each faction. I would like to have a unique image for each homeworld, but I don't believe I will have time to do this.

Going Forward

There is lots left to do, and the game jam is more than halfway over! I still have to implement the Big alien, the Trader cruiser attack ship, AIs for them, and changes to the player AIs to account for the new ships. Next, I need to implement interactions between the ships that do not have them. Currently, the Trader ships and Fighter colonies are ignored by everything. Finally I need to implement a way for the player to determine whether or not they will attack the traders, and a penalty for attacking them (since they are neutral bystanders). Implementing all of this and then working out the bugs is going to take a while.

In terms of UI and game polish stuff, there isn't too much left to do (famous last words). I have all the art and sound assets I need, so anything else added would just be bonus, and there will probably not be time for that. I need to add a save game system, but that is more time consuming than challenging. My plan is to simply save out a text file that contains just the information needed to reconstitute the objects of the game state. I might need to have more than one of these files for each save, just for simplicities sake, but I am not sure yet. Finally, I need to add a tutorial and help system to the game. Tutorials are always a rough spot for strategy games, so I am not sure that I will be able to craft a good one with limited time, but I'm definitely going to try.

I'm also planning to make a lengthy gameplay video soon to show off the gameplay :)