Enemy-motion-aware bullet simulation #122
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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