Linear extrapolation gun that plugs into the existing gun harness. Predicts enemy continues at current velocity and heading. Extrapolates position by ticksToArrive = distance / bulletSpeed. Returns absolute (x, y). onResult() is no-op (analytical gun).
Register it in ModularBot alongside head-on gun. The bot now has two guns competing via virtual bullet fitness — should switch to linear against moving targets.
Acceptance criteria
Linear gun implements Gun interface
Registered in ModularBot alongside head-on gun
Virtual bullet tracker shows linear gun winning against moving enemies
No regressions — bot still works against SittingDuck
## Parent
#165 (ModularBot wayfinder map)
## What to build
Linear extrapolation gun that plugs into the existing gun harness. Predicts enemy continues at current velocity and heading. Extrapolates position by ticksToArrive = distance / bulletSpeed. Returns absolute (x, y). onResult() is no-op (analytical gun).
Register it in ModularBot alongside head-on gun. The bot now has two guns competing via virtual bullet fitness — should switch to linear against moving targets.
## Acceptance criteria
- [ ] Linear gun implements Gun interface
- [ ] Registered in ModularBot alongside head-on gun
- [ ] Virtual bullet tracker shows linear gun winning against moving enemies
- [ ] No regressions — bot still works against SittingDuck
## Blocked by
#179 (T1)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent
#165 (ModularBot wayfinder map)
What to build
Linear extrapolation gun that plugs into the existing gun harness. Predicts enemy continues at current velocity and heading. Extrapolates position by ticksToArrive = distance / bulletSpeed. Returns absolute (x, y). onResult() is no-op (analytical gun).
Register it in ModularBot alongside head-on gun. The bot now has two guns competing via virtual bullet fitness — should switch to linear against moving targets.
Acceptance criteria
Blocked by
#179 (T1)
Implemented. Build is clean.
common_libs/guns/linear.nim— new file:predict: ticksToArrive = dist / bulletSpeed; extrapolates usingcos(headingRad) * speed * ticksfor X,sin(headingRad) * speed * ticksfor Y; clamps to arena boundsonResult: no-op (analytical gun)ModularBot_garage/src/ModularBot.nimchanges:guns/linearlinear: LinearGunfieldinitTracker(1)→initTracker(2)(gun 0 = head-on, gun 1 = linear)onScannedBot: spawns virtual bullets for both guns each scangunId(caseon 0/1)selectShotpicks winner;predcomputed from winning gun'spredict