Update 0.21.0 - Pathfinding & AI


Another month, another update. 0.21.0 is now out and ready for testing.

What’s New?

As you can no doubt tell by the title of this devlog the main focus of this update was on both the pathfinding and the enemy AI. More specifically, the pathfinding of units in space battles and the AI that controls them when they are not owned by the player.

The first of these changes I’ll talk about relates to the pathfinding of non squad based units, those being units not connected to others in the same group; which has been entirely overhauled. In prior versions pathfinding was calculated using a combination of bezier curves and unit generated turning circles. This meant that each unit generated a pair of circles, one to either side of them and travelled along the edge of the circle until they found the calculated exit point. The main benefit of this system was that it guaranteed the turning radius of units would always be the same, regardless of where the path's destination was. However, this also meant that units would always complete their turn at the start of a movement path instead of it being spread out across the entire path's length. Something which would have looked more natural.

By contrast the new movement system only makes use of bezier curves and rather than each unit having a set turning radius. Turning radius is now calculated based on the unit's size which as an added bonus also reduces the amount of work required to make new units. In addition to this as mentioned before and in contrast to the previous system any required turns in the movement path are now spread out across the entire length of the path as opposed to them just being at the beginning. Resulting in the aforementioned smoother looking and more organic movement path.

Beyond the more broad changes to how the overall pathfinding system works, the system now also takes into account the intended target rotation of units at the path's destination. Instead of arriving at the destination and then turning to face the target point like in previous versions. The movement path will instead be generated with this in mind, causing units to arrive at their destination already in the correct rotation.

The last two points of note when it comes to pathfinding that I’ll mention relate specifically to squad based units. Firstly from this update onwards when a squad based unit has been told to capture a building they will now path in a circle around the aforementioned building, ensuring they remain within the capture area and preventing the capture progress from stuttering like it did previously. As for the second point Stelestial Contact: Solar Storm is a 3D game and so squad based units have now been made aware of this fact. Somewhat…

On occasions when their intended destination is located behind them then squad based units will now have a chance of choosing to path back up and over themselves instead of turning on a flat plane like before. While this doesn’t change much from a gameplay perspective, it does add more variety to the movement of squad based units. Additionally, while I didn’t get the chance to do it in this update I also plan to apply these kinds of changes to squad vs squad combat in the next update. They’re in a 3D space and so, they should probably act like it.

Having given you an idea of what to expect when it comes to the pathfinding part of this update, I’ll also quickly go over some of the changes you can expect to see when it comes to the AI. To begin with it was pretty clear in previous versions that the AI acted too quickly and so wouldn’t give the player a chance to build up their own units before they became overrun. To try and alleviate this problem the AI now has a number of timers to limit the rate at which they build units and complete upgrades. With the current battle time acting as the anchor block for when they can build more units or upgrade their space station.

In addition to these time limits the AI is now also limited on the number of high tier units they can build, preventing them from just spawning battleships and carriers, subsequently forcing them to build a more diverse fleet.

Finally I’ll also mention that this update made a couple of important balance changes, the first being an increase in the cost of upgrading space stations. Which should help to better pace battles over the course of 10 to 15 minutes. With the second being an increase in the size of battle maps to allow more room for manoeuvring of units and to push a greater emphasis on scouting out the map before engaging with the enemy.

Update 0.22.0

With all that out of the way you’re now probably asking yourself “What can I expect from the 0.22.0 update?”. Well like 0.21.0 the 0.22.0 update is going to be aimed at continuing my work on polishing the existing systems and getting the game into a more stable, enjoyable and presentable state. Using this line of thinking the first big change in 0.22.0 is going to be in the form of an overhaul of the GUI.

While the current GUI does its job it lacks any kind of personality and on many occasions feels as though it fades into the background of space itself. Creating both a visually appealing and functional GUI is hard and so while I won’t promise any major overhauls to the placement of elements within the GUI or changes to its core design; at least not in this update. I can promise changes in the form of overall design, colour and readability of the various GUI elements and menus.

Beyond just the changes to the GUI the 0.22.0 update will also continue my work on pathfinding and AI from this update. Though this time the changes will be primarily focused on the campaign map and around trying to make the campaign a more challenging game mode while at the same time not making it so difficult that the AI gets an easy victory over the player.

Other than this 0.21.0 also brought an increase in the size of the battle maps and for 0.22.0 I want to do a similar thing to the campaign map. To this end I’m planning on both increasing the bounds of the campaign map and also increasing the total number of planets, asteroids and nebulas which can be travelled to.

Finally as seems to be the case with every update I release there were still a number of additions and changes I had planned for 0.21.0 which weren’t completed in time and therefore will instead be implemented in 0.22.0. These include the overhaul to the squad vs squad combat, the introduction of 3v3, 4v4 and 5v5 maps, the introduction of a fog of war system which should now be easier to implement thanks to the inclusion of volumetric fog in Godot 4 and optimizations aimed at allowing the unit cap to be increased so the new map sizes can be utilised to their full extent.

Closing Thoughts

I’ve no idea how well the changes made in 0.21.0 will play but from my own testing battles should feel a lot more enjoyable as compared to previous versions. Of course I am only one person and while I do my best to ensure there are no major bugs or issues before making a new version public there will no doubt be some that I missed. For that I apologise and I will endeavour to resolve them over the course of future updates.

With that in mind I should probably now get to work on that next update and so I’ll end this devlog here.

As always if you have any questions or queries then don’t hesitate to ask and similarly if you have any feedback for existing systems. Or indeed if you have any ideas, features or changes you would like to see implemented then also don’t hesitate to let me know.

As with all of my updates a full list of the changes made can be found in game, with the changes and additions pertaining to this update listed below:

  • Added a new ammo type, ion. Which deals increased damage to shields but reduced damage to armour and health
  • Added a small, medium and large ion laser turret to make use of the new ion ammo type
  • Added a build progress shader for areas of buildings being built as a result of upgrades in space battles
  • Added a new set of buttons to the debug menu in space battles for giving and removing 100 UC from the player
  • Added a option to hold the shift key and scroll the mouse wheel while issuing a drag move command to change the spacing between units
  • Added a option to hold the H key to highlight every unit on the battle map
  • Updated the Human frigate, Alien frigate, Human battleship, Alien battleship, Human carrier and Alien carrier to make use of the new ion turrets for some of their weapons
  • Updated the mesh used for displaying the laser beam ammo type
  • Updated the space battle AI to have a minimum time between space station upgrades, preventing them from being rushed at the start of the match
  • Updated the space battle AI to have a limit on the number of large units they can field at any one time (battleships and carriers)
  • Updated the space battle AI to spawn units more slowly depending on their difficulty level
  • Updated the space battle multi move option to take into account unit positions when assigning unit destinations
  • Updated the movement of units in space battles to be smoother when their destination is set behind them
  • Updated the movement of units in space battles to take unit size into account when calculating the curve of the move path
  • Updated the movement of units in space battles to take the intended destination rotation into account when calculating the move path
  • Updated the movement of squad based units in space battles so that they can path back over themselves when the next move point is behind them
  • Updated the movement of squad based units in space battles so that when they are capturing a building they circle it
  • Updated the movement of squad based units in space battles to take the intended destination rotation into account when calculating the move path
  • Updated the pathfinding of fleets and armies on the campaign map to prioritise friendly locations when calculating a movement path
  • Updated the campaign map movement path colour to account for individual locations when setting the path colour instead of just the destination location
  • Updated the space battle background to be a shader instead of a static image, allowing maps to have different backgrounds without making a new texture
  • Updated the space battle GUI to allow the bottom panel to be resized to cover the entire width of the screen
  • Updated the space battle GUI label used for displaying the current UC amount to also display the amount of UC currently being earned
  • Updated the selection circle of units to be green for player owned, blue for ally owned and red for enemy owned
  • Updated the capture area outline for capturable buildings to be white for buildings not yet owned, green for player owned, blue for ally owned and red for enemy owned
  • Updated the background colour for unit and building button healthbars to be a darker red compared to the low health red
  • Updated the battle setup screen to support up to 10 individual teams, increased from 4
  • Increased the size of battle maps to allow more room for unit movement with 1 v 1 maps increasing from 200m² to 300m² and 2 v 2 maps increasing from 200m² to 400m²
  • Increased the cost of space station upgrades from 100UC to 500UC and 1000UC respectively. Also increased their build times from 5 seconds to 15 seconds
  • Fixed a bug where turrets wouldn't fire at targets directly above them
  • Fixed a bug where holding down the spacebar no longer displayed the attack range for all units when none were selected
  • Fixed a bug where squad based units would sometimes get locked in a direction while the game was running at 2x the normal speed
  • Fixed a bug where it was possible to begin a space battle despite there being only a single team selected
  • Fixed a bug where the campaign setup screen didn't animate correctly when pressing the return button
  • Fixed a bug where the minimap wouldn't work on maps over a certain size
  • Fixed a bug where the particles used to show an impact of a laser type ammo wouldn't always be emitted
  • Fixed a bug where the particles used to show that a laser beam turret was charging displayed incorrectly
  • Fixed a bug where the particles used to show engine subsystems were reversed on some units
  • Fixed a bug where the debug option for drawing small unit paths would attempt to draw a path even if there wasn't one
  • Fixed a bug where the debug option for drawing enemy unit paths no longer worked
  • Fixed a bug where the button for the human bomber didn't correctly display the amount of health
  • Fixed a bug where the centre camera on unit option triggered when double clicking a unit button wouldn't correctly centre the camera
  • Fixed a bug where the battle result screen didn't correctly display the list of units lost
  • Fixed a bug where the boost speed ability would result in incorrect rotation for units while the game was running at 2x the normal speed
  • Fixed a bug where the game would attempt to highlight squad based units when the mouse was placed over their weapon subsystem
  • Fixed a bug where the orientation of drag move markers would still be updated even if they had already been committed
  • Fixed a bug where the unit drag move marker could get stuck on the screen if the mouse was moved over the GUI or outside of the window
  • Fixed a bug where the aim weapons button would still cause the turrets of selected units and buildings to rotate even when the game was paused
  • Fixed a bug where the mesh for the fire weapon ability was no longer visible
  • Fixed a bug where the instant build option used on the test map would not work if there was more than one unit in the build queue
  • Fixed a bug where the space battle AI could build all units available at a space station regardless of the units required build tier or the space stations current tier
  • Fixed a bug where the game would crash when giving an attack order on a squad based unit while a move marker was still animating
  • Fixed a bug where the attack range of units wouldn't be shown while the game was paused despite the space key being held down

Files

Stelestial Contact Solar Storm 0.21.0 - Debug.zip 97 MB
Jun 23, 2023

Get Stellar Odyssey: Galaxy at War

Leave a comment

Log in with itch.io to leave a comment.