📖 Read the Catch the Stars tutorial
Games get exciting when you can lose! The variable lives counts how many mistakes you're allowed. When it hits 0, it's game over. The function onMiss runs when a star hits the floor.
🎯 Start with 5 lives, and make every miss cost exactly 1 life.
🧺 Your game
Press Play to try your game. Change the code, then press Play again to see the difference.
Lesson 3 of 11 · Lesson map · Your code runs safely inside this page and is never sent anywhere.