Rivals
Two rival swarms work the same farm. Each reads the field ledger, takes the richest plot it can reach, crosses the farm to it at cruise altitude, drops into the crop and works it in lanes until it is bare, then leaves for the next one. A field a rival strips is gone for good — th…
Rivals — the other hosts
Two rival swarms work the same farm. Each reads the field ledger, takes the richest plot it can reach, crosses the farm to it at cruise altitude, drops into the crop and works it in lanes until it is bare, then leaves for the next one. A field a rival strips is gone for good — that is the race.
Rules owns the lifecycle: Rivals.init(anchor) builds the proxies once,
Rivals.reset() restarts them for a round, Rivals.update(dt) flies them.
Rivals.leader() is the best rival tonnage on the board.
Everything a reader needs is on Locust.state.rivals[i]:
name x y z heading mass tonnage skill alive feeding mode field
mode is travel / work / gone. skill (C.RIVAL_SKILL) is flight
quality, not a tax on the harvest: a rival converts what it eats exactly the way
the player does, and skill decides how briskly it works a lane and how reliably
it reads a spray plume. So the tonnage on a rival's HUD bar is directly
comparable to yours.
Seeing them
Each rival carries a dark cloud proxy and, while it is down feeding, a column of
dust standing on the ground under it — that column is what you spot from the far
side of the farm. Rivals.update also calls Locust.systems.swarm.setRivalCloud
every frame, so the swarm-render slice can draw the real thing. When it does,
set Swarm.rivalCloudsDrawn = true and these proxies stand down automatically,
leaving only the dust.
Scoped to this part · feeds back into the world's score.