Full playable demo

Play the full demo

Catch cyan pods, dodge orange meteors, then test both endings and the R restart.

Playable result only — the source code stays hidden.

Mission 00 5 min

Mission 0: See What You’re Building

Play Galaxy Rescue first. The game starts immediately. Use Left/Right Arrow to steer, catch cyan rescue pods, avoid orange meteors, rescue 8 pods to win, and press R after a win or loss to play again.

This is a capstone, but we will still build it in small steps. Visual pieces will not appear from nowhere: you will make one pod and one meteor before turning them into moving groups.

Concepts you will deliberately reuse

  • strings, comparisons, if and else if
  • AND &&, OR ||, parentheses and braces
  • arrays, indexes, .length and for loops
  • objects and property updates
  • functions, parameters, function calls and return
  • += and -= counters
  • random() and dist()
  • template literals
  • held-key movement and one-time key events
Build roadmap

What you’ll build, mission by mission

  1. 1
    Game state

    Use a string and condition to control when game code updates.

  2. 2
    Ship controls

    Reuse held-arrow movement and constraints.

  3. 3
    Draw a rescue pod

    Build the two-circle pod yourself with an object and drawing function.

  4. 4
    Pod squad

    Scale one pod into an array drawn by a loop.

  5. 5
    Move the pods

    Update each object's y-position using its own speed property.

  6. 6
    Recycle the pods

    Reset off-screen objects to random positions with a helper.

  7. 7
    Collision helper

    Return a reusable Boolean from `dist()`.

  8. 8
    Rescue a pod

    Use the collision result to update a counter and reset one pod.

  9. 9
    Live HUD

    Display current progress and lives with a template literal.

  10. 10
    Build a meteor

    Create the hazard's visual design before it becomes dangerous.

  11. 11
    Meteor squad

    Transfer the array-loop-helper pattern to meteors.

  12. 12
    Meteor damage

    Reuse collision logic to lose one life per hit.

  13. 13
    Win or lose

    Use if/else-if to choose one end state.

  14. 14
    Finish Galaxy Rescue

    Use grouped AND/OR logic to add a correct one-time restart.

Mission demoUse a String to Control Game State

Finished result only — the answer code stays hidden.