Scene transitions and basic combat AI

Worked on initializing the combat and star map scenes with correct starting information. Now if fleets meet at a star system, a combat scene is started and corresponding data is transferred to the combat scene. After the combat the star map is loaded and casualties are removed from the fleets. It is still handy to be able to test any scene you want by starting straight from that scene, and not having to navigate to that state of the game from the start. So each scene can also be started directly in which case it uses a test state for initialization which can be set from the Unity editor.

Also made a basic AI to control enemy ships in combat. Now they just queue to attack every opponent ship (player ships) one by one. I have done a coroutine based state machine for the individual ships and the same state machine could be used for the AI controlling the whole army. The state machine is very flexible and I feel that it will be enough for anything I need.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: