🎭 Characters (Sprites)
Player Basket: Moves left and right to catch stars
Falling Star: Falls from top, gives points when caught
Game Controller: Manages score, lives, and game rules
Ready to create your very first game in Scratch? We’ll build “Catch the Falling Stars” - a fun, complete game that teaches essential game development concepts while being engaging to play!
Catch the Falling Stars is a simple but addictive game where:
Before we start coding, let’s plan our game like professional developers:
🎭 Characters (Sprites)
Player Basket: Moves left and right to catch stars
Falling Star: Falls from top, gives points when caught
Game Controller: Manages score, lives, and game rules
🎬 Game Mechanics
Movement: Arrow keys control the basket
Collision: Stars disappear when touching basket
Scoring: +10 points per star caught
Difficulty: Stars fall faster as score increases
🎨 Visual Design
Background: Night sky with stars
UI Elements: Score display, lives counter
Effects: Star sparkles, sound feedback
Polish: Smooth animations and transitions
🎵 Audio Design
Catch Sound: Pleasant chime when catching stars
Miss Sound: Gentle notification when missing
Background Music: Optional ambient space music
Game Over: Distinctive end-game sound
Let’s start by creating our game environment:
🎨 Choose Your Backdrop Go to the Stage and click the backdrop icon. Choose “Space” or “Night” backdrop, or create your own starry sky.
🗑️ Remove the Default Cat Right-click on Scratch Cat and select “delete” - we don’t need it for this game.
🎯 Add the Player Basket Click the sprite icon and search for “basket” or draw a simple rectangular basket using the paint editor.
⭐ Add a Falling Star Add a star sprite from the library, or draw your own yellow star shape.
📺 Create Game Variables Make these variables for all sprites:
score
(visible on stage)lives
(visible on stage)star_speed
(hidden - controls difficulty)game_running
(hidden - tracks game state)The basket is our player character - it needs to respond to keyboard input:
when green flag clickedset [game_running ▼] to (1)go to x:(0) y:(-150)
forever if <(game_running) = (1)> then if <key (left arrow ▼) pressed?> then change x by (-5) end if <key (right arrow ▼) pressed?> then change x by (5) end
// Keep basket on screen if <(x position) < (-220)> then set x to (-220) end if <(x position) > (220)> then set x to (220) end endend
when green flag clickedforever if <(game_running) = (1)> then go to x:(mouse x) y:(-150)
// Keep within screen bounds if <(x position) < (-220)> then set x to (-220) end if <(x position) > (220)> then set x to (220) end endend
Stars need to fall from the top and reset when they hit the bottom:
when green flag clickedset [star_speed ▼] to (2)hide
forever if <(game_running) = (1)> then // Start at random position at top go to x:(pick random (-220) to (220)) y:(180) show
// Fall down at current speed repeat until <(y position) < (-180)> change y by (0 - (star_speed))
// Check if caught by basket if <touching (Basket ▼)?> then change [score ▼] by (10) play sound (collect ▼) until done
// Increase difficulty slightly change [star_speed ▼] by (0.1)
// Reset star position go to x:(pick random (-220) to (220)) y:(180) end
wait (0.02) seconds end
// Star hit ground - lose a life change [lives ▼] by (-1) play sound (miss ▼) until done
// Check for game over if <(lives) ≤ (0)> then set [game_running ▼] to (0) hide say [Game Over!] for (3) seconds stop [all ▼] end
hide wait (pick random (0.5) to (2)) seconds endend
Create a game controller sprite (invisible) to manage the overall game:
when green flag clickedset [score ▼] to (0)set [lives ▼] to (3)set [star_speed ▼] to (2)set [game_running ▼] to (1)
// Display instructionssay [Use arrow keys to catch falling stars!] for (3) secondssay [Don't let them hit the ground!] for (2) secondssay [Get ready...] for (2) seconds
// Start the game loopbroadcast (start game ▼)
when green flag clickedforever if <(game_running) = (1)> then // Change difficulty based on score if <(score) > (50)> then set [star_speed ▼] to (4) end if <(score) > (100)> then set [star_speed ▼] to (6) end if <(score) > (200)> then set [star_speed ▼] to (8) end end wait (1) secondsend
Professional games feel great because of small details:
when I receive (star caught ▼)repeat (5) change [color ▼] effect by (25) change size by (20) wait (0.1) seconds change size by (-20) wait (0.1) secondsendclear graphic effects
when I receive (game over ▼)repeat (3) change [brightness ▼] effect by (50) wait (0.2) seconds change [brightness ▼] effect by (-50) wait (0.2) secondsend
when I receive (star caught ▼)repeat (2) change size by (10) wait (0.1) seconds change size by (-10) wait (0.1) secondsend
Take your game to the next level with these enhancements:
Add special golden stars that give bonus points or temporary abilities:
// Golden Star (rare)if <(pick random (1) to (20)) = (1)> then set [color ▼] effect to (50) // Make it golden
when caught: change [score ▼] by (50) set [star_speed ▼] to (1) // Slow down for 5 seconds wait (5) seconds set [star_speed ▼] to (normal speed)
Create trails and explosion effects:
// Star Trail Effectwhen green flag clickedforever create clone of (myself ▼) wait (0.1) seconds
when I start as a cloneset [ghost ▼] effect to (80)repeat (10) change [ghost ▼] effect by (2) wait (0.1) secondsenddelete this clone
Remember the best score between games:
when green flag clickedif <([high score ▼] list) contains (anything)?> then // Load existing high scoreelse add (0) to [high score ▼]end
when game endsif <(score) > (item (1) of [high score ▼])> then replace item (1) of [high score ▼] with (score) say [NEW HIGH SCORE!] for (3) secondsend
Professional developers spend lots of time testing. Here’s how to test your game:
🎯 Test Basic Functionality
⚖️ Check Game Balance
🐛 Find and Fix Bugs
✨ Polish the Experience
Once your basic game works well, try these advanced additions:
🌟 Multiple Star Types
Different colored stars worth different points, or stars that move in patterns instead of just falling straight.
🎭 Character Customization
Let players choose different basket designs or unlock new looks based on their score.
🏆 Achievement System
Awards for reaching certain scores, catching stars in a row, or playing for a certain amount of time.
🌍 Multiple Levels
Different backgrounds, star patterns, or gameplay mechanics as players progress.
This project teaches fundamental game development concepts:
Ready to create more complex games?
Congratulations! You’ve built your first complete interactive game. This is just the beginning of your game development journey with Vibelf’s guidance! 🎮✨