Game 041 — Moving Target

New concept: requestAnimationFrame game loop (frame-based updates).

Play

Start the loop, then click the moving target for points. Pause/resume to prove you can control an animation loop.

Score: 0 | Speed: 2 px/frame

Learning Notes

🧠 What’s different from last game?

Instead of moving only on input events, this game updates position continuously every frame using requestAnimationFrame.

🔀 Optional challenge variants

Reverse direction at edges • Add vertical movement • Change speed mid-run • Add a “resume” hotkey.

Tip: The key skill here is safely starting/stopping the loop so it doesn’t “run forever” when the game ends.