Full playable demo

Play the full demo

Play the completed game first. It starts moving right automatically; use the arrow keys to steer. Reopen it whenever you need to check the target behaviour, but the demo never reveals the source code.

Playable result only — the source code stays hidden.

Mission 00 5 min

Mission 0: See What You’re Building

Play Snake Lite before you code. This is the hardest quest in the pack. The snake moves on a grid, remembers several body positions, grows when it eats, loses on walls or itself, and speeds up as the score grows.

Controls: use the arrow keys to steer. The snake starts moving right automatically. After losing, press R to restart.

Mission 0 is especially useful here: focus on the behaviour first. You do not need to understand the whole finished program before Mission 1.

Build roadmap

What you’ll build, mission by mission

  1. 1
    Move on a grid

    Use a timed beat instead of smooth movement.

  2. 2
    Turn with arrows

    Change direction rather than position directly.

  3. 3
    Place food

    Add another grid object.

  4. 4
    Eat food

    Score and respawn food on the grid.

  5. 5
    Remember the body

    Use an array as movement history.

  6. 6
    Grow

    Keep one extra body position after eating.

  7. 7
    Hit the wall

    Validate the next head before moving.

  8. 8
    Bite your tail

    Search the body array for self-collision.

  9. 9
    Restart

    Reset the full structured state.

  10. 10
    Speed up

    Increase difficulty at score milestones.

Mission demoMove One Square at a Time

Finished result only — the answer code stays hidden.