What happens when my program runs out of cycles, and how do I make it faster?
Your bot's CPU gets a fixed number of cycles each tick, 20 ticks a second: 256 in the assembly league and 512 in every other league. If they run out, the tick ends wherever your code is, and it carries on next tick with readings a tick old. Nothing crashes, but your bot reacts late. Check your cycles per tick in the Match panel after a test, and do less work each tick.