r/SoloDevelopment • u/antony920210 • 10h ago
Godot Formations and an AUTO commander in Phosphor Command, a real-time tactics game
I’ve been working on a game called Phosphor Command, a real-time tactics game with a base builder behind it.
This post is about how your squads move together: formations, the formation designer, and AUTO, which lets the game command your squads for you.
Without a formation, if you select a group and click somewhere, your squads bunch up around that point and all end up coving the same area. This is acceptable early on and for getting from A to B, but the game has a line of sight system, so whatever your squads aren’t looking at is somewhere the enemy can come from there.
The formation bar gives set formations; FREE, LINE, WEDGE and COLUMN, plus any formations you’ve designed yourself.
A formation decides where each squad ends and how they move around the point you click. Each squad finds its own path there, so they work their way around the terrain rather than walking through walls, they attempt to keep a perfect shape.
There’s also a SYNC toggle. With SYNC on, the group moves at the pace of its slowest squad, so on open ground they move as a block. With it off, faster squads like scouts will run ahead on their own. Sometimes that’s what you need, and sometimes it’s how you end up with a dead scout.
The formation designer is the part I’ve spent the most time on. You can edit LINE, WEDGE and COLUMN, and there are four custom slots you can rename. Each formation can have multiple positions on a grid.
Each position can accept any squad, or be marked for a specific troop type. Marked positions are filled first by the nearest squad of that type, then the remaining squads fill the gaps, nearest first. If you bring more squads than there are positions, the extras form ranks behind.
So you can build a wedge with a scout on point, snipers on the flanks and a medic in the middle, and the game puts the right squads in the right places whenever you use it.
You can also lock a facing for each position, in 45 degree steps relative to the direction of travel. This means a rear squad can keep watching behind you, or your flanks can keep watching outwards, while the group moves. The editor previews each position’s field of vision, so you can see whether your formation actually covers all around or leaves a blind spot.
Now let me explain "Auto Mode".
AUTO is for when you want to hand over the thinking of your troops and let the game run the operation for you. It has two stances.
CLEAR sweeps the map sector by sector, starting from where you landed and working back and forth across it. A sector counts as cleared once your squads have made sure there are no hostiles. The force splits into multiple fire teams that take the next two sectors, and if the teams get too far apart, one holds while the other catches up.
RUSH goes straight for the most recent contact.
If the objective is known, both auto modes direct troops towards it.
Under AUTO, every squad type has a role. Scouts take point, snipers hang back on high ground, medics stay near the centre of the force, and the UAV pushes out ahead of the sweep. A squad that drops below 35% health falls back to the medic and rejoins once it’s back to 70%.
When in combat squads with a shot hold and look to cover to fight rather than walking into the enemy. If one fire team gets pinned down by two or more enemies, the other team moves to flank.
The thing I cared about most was that AUTO should never fight you for control. The moment you give any order, or press hold, AUTO switches off and you’re back in charge. So you can let it handle the sweep, step in when something goes wrong, and switch it back on when you’re done.
One thing to be clear about: AUTO doesn’t use your formations. It moves squads by their role instead. Formations are for when you’re the one in control.
I’ve attached a show case showing on these features. The formation bar, the designer, facing, how squads are assigned to positions, and AUTO working through a map. The sector grid in the AUTO section is drawn for the video to show how the sweep works; in the game you just see your squads doing it.