In the last two weeks I've made some really great progress; mostly in the background but I’ve still got some bits to show off!First up is a new enemy ship which looks and behaves differently to any of the player’s ships.
It’s nice to have an enemy unit that actually looks evil (opposed to identical human ships fighting!) and it’s helping to make the game look less like a tech demo. I also worked on how weapons are programmed - they’re now structured in a sensible fashion that allows me to quickly add new variants and simply drop prefabs where I want them. The fixed ion beam in the picture above uses 99% of the same code as the ion beam turret, so all the changes to underlying functionality get propagated properly. Hurrah for coding standards! The new baddie also has some missile launchers on the underbelly which you can see below. The missiles shoot down a little bit before engaging target tracking which looks pretty great!
To help in scripting events I wrote a simple barely-finite state machine class and editor. It’s really lightweight but it’s very useful in visualising relatively complex relationships between states. I can simply attach functions to each state or transition to run at specific points. This is turning out to be a super useful tool in scripting events, like the basic enemy wave event below:
You can also see the simple debug strings and the highlighted state that’s active. Ultimately the events will be come much more complex, so this will help prevent nasty bugs from unexpected situations.Finally - I made my first game animation! The ion turrets can now retract when outside of combat for a more sleek appearance, which also helps separate the combat and peacetime as ships have a distinctly different profile. It took a while to get there though, since I encountered a Unity-Blender animation import bug. Unity confirmed it was a bug, so at least I’m not going crazy :D