Prototype goto controller and test in game #23
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?
Blocked by: Goto controller algorithm
Parent map: #18
Question
Does the goto controller feel right when tested in the actual game? Does the tank move fluidly to target positions? Does forward/reverse selection work correctly?
Build a minimal goto controller (whatever algorithm was decided in the goto controller ticket), wire it up with hardcoded goto targets (e.g. cycle between corners), and observe the tank's movement in the Tank Royale UI. Evaluate smoothness, arrival behavior, and reverse-driving logic.
Resolution
Goto controller validated in-game via GotoTest prototype bot.
Algorithm
Explicit proportional steering with forward/reverse at 90° bearing threshold, using
getNewTargetSpeedfrom utils.nim for smooth deceleration. Notan(a)/cos(a)trick — explicit branching is more robust near walls.AimTo controller
directionTo(target) - gunDirection→normalizeRelativeAngle→ clamp to ±20°/tick. Gun independent of body viasetAdjustGunForBodyTurn(true).Test results
Prototype location
GotoTest/— throwaway bot, single file