Build a Space Shooter Game
Defend the galaxy! Blast waves of alien invaders in your own browser game, just like the classic Space Invaders.
About this course
Every lesson is hands-on and explained in plain English — no scary jargon. Each one ends with something you actually build, so the game grows a little more exciting every time.
8 lessons
What Makes a Space Shooter Fun
Play the classics and spot the secret ingredients: a ship you control, enemies that push toward you, and that satisfying moment a shot connects. You'll sketch your own game on paper before writing a single line.
Your Ship and the Starry Screen
Set up your game screen (the 'canvas') and draw your hero ship at the bottom. Think of the screen like a piece of graph paper where everything has an X and Y spot.
Moving Left and Right
Make your ship slide smoothly when you press the arrow keys. You'll learn the game loop — the heartbeat that redraws everything many times a second so motion looks alive.
Pew Pew! Shooting Lasers
Press space to fire. You'll create laser 'sprites' that fly upward and disappear off the top. This is your first taste of spawning and removing things on the fly.
Waves of Alien Invaders
Fill the top of the screen with a neat grid of aliens that march side to side and step downward. You'll use a loop to make many enemies from one recipe.
Boom! Hits, Score, and Lives
When a laser touches an alien, make it explode and add points. Give the player 3 lives, and end the game when the aliens reach the bottom. This is collision detection — the heart of arcade games.
Level Up: Faster, Harder, Replay
Clear a wave and the next one comes in quicker. Add a 'You Win / Game Over' screen with a Play Again button, then share your finished game with a friend.
The Real Build: Galaxy Defender, Prompt by Prompt
The actual 13 prompts — typos and all — that took Galaxy Defender from nothing to a live game with music, math power-ups, unlockable ships and a parents’ scoreboard, with a prompting lesson drawn from each one.