Workshop › Space Invaders-style › Step 21 of 21

Build it yourself: an extra life

What we are doing

Now it's your turn, without code to copy: every 1500 points you earn an extra life. At 1500 points the lives go up by one, at 3000 again, and so on.

Your turn

Change the code so that crossing 1500, 3000, 4500… points gives one more life, only once for each.

Skills: Game states

All steps

  1. The ship
  2. The game loop
  3. Move the ship
  4. Stay on screen
  5. Fire
  6. Bullets fly
  7. A short reload
  8. The invaders
  9. The march
  10. Hit!
  11. Score
  12. They shoot back
  13. Bombs fall
  14. Lives
  15. Game over
  16. Best score
  17. A wave in a function
  18. Play again
  19. Waves
  20. Faster and faster
  21. Build it yourself: an extra life