Full playable demo

Play the full demo

Play the completed Catch the Falling Star game in Mission 0, then build the same game one small feature at a time. You can reopen the full demo later whenever you need to check the target behaviour.

Playable result only — the source code stays hidden.

Mission 00 5 min

Mission 0: See What You’re Building

Before you start coding, play the finished Catch the Falling Star game.

Watch what happens when you move the basket, catch a star, miss a star, win, lose and restart. Then you will build the same game from a nearly blank canvas, one small feature at a time.

What you’ll practise

  • variables and changing values
  • keyboard input
  • if, else if and else
  • random positions
  • collision checks with &&
  • strings and numbers for score and lives
  • functions for organising a larger program
Build roadmap

What you’ll build, mission by mission

  1. 1
    Build the basket

    Draw the player basket and store its position in a variable.

  2. 2
    Move the basket

    Use the arrow keys to move it left and right.

  3. 3
    Drop a star

    Add a falling object whose position changes every frame.

  4. 4
    Reset the star

    Send the star back to the top at a new random x position.

  5. 5
    Catch the star

    Detect when the falling star reaches the basket.

  6. 6
    Keep score

    Add one point for each catch and display the score.

  7. 7
    Add three lives

    Lose a life when the star reaches the bottom.

  8. 8
    Win or lose

    Give the game clear winning and game-over states.

  9. 9
    Restart the game

    Press R after the game ends to reset all the important state.

  10. 10
    Organise the game

    Move working code into clear functions so the final program is easier to read.

Mission demoBuild the Basket

Finished result only — the answer code stays hidden.