Fix the enemy-motion snapshot error by interpolating enemy position at bullet arrival time in the virtual bullet tracker.
Currently all 64 virtual bullets in a generation use the same enemy position snapshot from onScannedBot. Bullets travel for 5-100 ticks, but the simulation checks hit/miss against the current enemy position, not where the enemy will be when the bullet arrives.
## What to build
Fix the enemy-motion snapshot error by interpolating enemy position at bullet arrival time in the virtual bullet tracker.
Currently all 64 virtual bullets in a generation use the same enemy position snapshot from onScannedBot. Bullets travel for 5-100 ticks, but the simulation checks hit/miss against the current enemy position, not where the enemy will be when the bullet arrives.
## Acceptance criteria
- stepBullets accepts enemyVx, enemyVy parameters
- stepBullets computes interpolated enemy position: enemyX + enemyVx * arrivalTicks
- spawnBullet calculates arrivalTicks = ceil(distance / bulletSpeed) and passes velocity
- Enemy velocity is threaded from onScannedBot (which already computes e.speed and e.direction)
- For stationary enemies (zero velocity), behavior is identical to current implementation
- Fitness scores are more accurate for moving targets
- Existing hit detection geometry tests still pass
## Blocked by
Tracker extraction (#121) - the VBulletEnvironment type must exist before we change its API
## Parent
Closes part of #118
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.
What to build
Fix the enemy-motion snapshot error by interpolating enemy position at bullet arrival time in the virtual bullet tracker.
Currently all 64 virtual bullets in a generation use the same enemy position snapshot from onScannedBot. Bullets travel for 5-100 ticks, but the simulation checks hit/miss against the current enemy position, not where the enemy will be when the bullet arrives.
Acceptance criteria
Blocked by
Tracker extraction (#121) - the VBulletEnvironment type must exist before we change its API
Parent
Closes part of #118
Implemented in commit a730a9e
Summary: Fixed enemy-motion snapshot error by interpolating enemy position at bullet arrival time. stepBullets now accepts enemyVx, enemyVy and computes interpolated position: enemyX + enemyVx * arrivalTicks. spawnBullet calculates arrivalTicks = ceil(distance / bulletSpeed).
Files:
vapourbot_garage/src/vapourbot/gun.nim- stepBullets signature, interpolation logic, spawnBullet arrival calculation