WARBIRDS.IO Dev Log

← All posts

The fleet learns to fight together

The air bots have real squadron doctrine — they fly in flights, escort the bombers, and run coordinated hammer-and-anvil torpedo attacks. The warships didn't: each AI hull fought its own lonely battle. So the naval AI got the same treatment. Ships now sail as a fleet — a division built around a flagship, a destroyer screen out ahead, and their guns all pointed at the same target.

An AI division steaming in line across open sea between two islands: several warships strung out in formation, the destroyer screen leading and the heavier ships trailing in the line, main-battery splashes bracketing a target mid-frame
A division underway — the destroyer screen out ahead, the cruisers and battleship in the line astern, all making for the cap together.

From a mob to a division

The old naval AI was a decent single-ship brain: each hull made for the capture zone, settled into a broadside, broke contact behind an island when it was losing. But there was no fleet in it. Three ships near each other fought three separate duels, picked three different targets, and ignored what their sisters were doing.

Now, on a slow clock, each team's hulls are dealt into a division — exactly the way the air bots are re-dealt into flights. The heaviest ship afloat becomes the flagship. The other cruisers and the battleship fall into the line astern of her; the destroyers, light and torpedo-armed, are thrown out ahead as a screen. When nobody's shooting, every ship keeps station on the flagship, so the whole formation steams for the cap as one body instead of dribbling in one hull at a time.

Concentrate the fire

The single biggest difference in a fight is focus fire. The flagship picks one enemy, and every ship in the division that can reach it shoots that ship — so a target gets bracketed by the whole line at once instead of soaking one gun while the others wander. A destroyer whose flagship's pick is hull-down miles away still falls back to its own nearest threat, so nobody sits idle; but when the division can gang up, it does.

Fight to your class

A battleship and a destroyer shouldn't fight the same way, so they no longer do. Each class has an engagement band:

And no two captains shoot alike: each one rolls an individual gunnery skill that scales their aim, so a division is a mix of crack shots and average ones rather than a wall of identical marksmen — the same trick the air bots have always used.

How it sits in the engine

It's a near-mirror of the air game's assignBotFlights, living behind the naval seam: a captain brain on each AI hull, a division re-deal on a slow clock, and a steering brain that reads its role and station. The air bots are a completely separate brain and don't change. Regression tests sail a full AI fleet action and check the division forms on its flagship, that a mate concentrates on the flagship's focus target, and that the fleet still fights its way to the cap and holds it.