Build a Fun Bouncing Ball Pong-Style Game in Scratch � Step-by-Step Guide
Scratch Game
Introduction: Why Build a Bouncing Ball Game in Scratch
Are you curious how to build games in Scratch or just starting your journey into block programming? Scratch is a block-based, drag-and-drop programming environment created by MIT. It's a fantastic platform for beginners�especially kids�to learn programming concepts using visually intuitive code. This Scratch Bouncing Ball Pong tutorial teaches ball physics and collision bounce.
This bouncing-ball game combines fundamental elements:
- � Motion & coordinate control
- � Sensing sprite overlaps
- � Variables for scoring
- � Control loops & if-statements
- � Environments: changing backdrops with game progression
- � Stop the game on a "game over" condition
- � Bonus: enhancements to make your game more advanced!
And guess what? In under 90 minutes, kids or novices can make a fun game in Scratch that bounces, scores, changes themes, and has game-over behavior�all without typing a single line of code.
What You'll Learn in This Tutorial:
- � How to make a game in Scratch with motion, collision, and scoring
- � Control sprite behavior using events and loops
- � Use variables to track scores
- � Change backdrops to enhance the gaming experience
- � Stop the game on a "game over" condition
- � Bonus: enhancements to make your game more advanced!
?? Watch the Full YouTube Tutorial Here:
Pong Game with Bouncing Ball � Scratch Game by Kodex Academy
Bouncing Ball Game in Scratch: Step-by-Step Guide
Before jumping into code, here's what the final Scratch game includes:
- � A bouncing ball sprite that moves and reflects off edges.
- � A green paddle sprite you control with the mouse�horizontal movement only.
- � A red "game-over" line at the bottom; touching it stops the game.
- � A scoreboard that increments every time the ball hits the paddle.
- � Backdrop switching when the score reaches five to make the environment pop.
This touches on key Scratch concepts: sprite selection, backdrop management, variables, senses, control, and motion. Plus it includes some fresh theme swapping�perfect for a splashy first Scratch project.
A. Scratch Pong Game Setup: Add Sprites & Backdrops Tutorial
- Delete default cat sprite ? pick the ball sprite.
- Add two backdrops: Boardwalk and Concert. Optional extras can be removed.
- Add a sprite for the "line" ? type "line" in Scratch's sprite search ? choose a red horizontal line and position it at the bottom.
- Add the "paddle" sprite ? search "paddle", pick the green paddle, position near bottom, above the red line.
?? Note: Backdrops set the game's scenes. Changing them when milestones are reached makes the experience dynamic.
B. Block Programming for the Ball
1. Scratch Ball Motion Tutorial: Start Bouncing Ball on Green Flag
when [green flag] clicked
point in direction (45)
forever
move (10) steps
if on edge, bounce
This block initiates the ball movement at a 45� angle and keeps it bouncing between edges. Great for ball bounce in Scratch.
2. Scratch Bouncing Ball Coding: Paddle Collision & Score Increase Tutorial
if < touching [paddle] ?> then
change [score v] by (1)
turn cw (pick random (170) to (190)) degrees
move (15) steps
wait (0.5) seconds
end
This custom logic boosts score by one each time the ball hits the paddle, adds a random reflection (avoiding repeated touches), and slightly delays before continuing. Essential for the Scratch bouncing ball game feel.
C. Scratch Scoring System Tutorial: Create & Display Score Variable
Initialize score at game start:
when [green flag] clicked
set [score v] to (0)
Combine this with ball motion blocks to ensure every playthrough starts fresh.
D. Scratch Backdrop Switch Tutorial: Change Background at Score 5
when [green flag] clicked
wait until < (score) > (5) >
switch backdrop to [Concert v]
Your game switches scenes automatically once you hit five! A fun way to show progression in your Scratch game development.
E. Scratch Game Over Logic: Stop All on Red Line Touch Tutorial
when [green flag] clicked
forever
if < touching [line] ?> then
stop [all v]
end
end
Touching the red line triggers a full stop. This simple check completes your game loop and ties into Scratch game tutorial essentials.
F. Scratch Pong Game Paddle Control: Follow Mouse X Tutorial
when [green flag] clicked
forever
set x to (mouse x)
end
This ensures the paddle follows your horizontal mouse movement�classic Pong in Scratch control. Confining vertical motion keeps gameplay fair.
Final Code Blueprint � All in One
Full Ball Script
Here's the complete set of ball scripts assembled:
when [green flag] clicked
set [score v] to (0)
point in direction (45)
forever
move (10) steps
if on edge, bounce
if < touching [paddle] ?> then
change [score v] by (1)
turn cw (pick random (170) to (190)) degrees
move (15) steps
wait (0.5) seconds
end
end
Then add a separate sprite script for backdrop switch and red line collision.
Red Line Sprite
when [green flag] clicked
forever
if < touching [ball] ?> then
stop [all v]
end
end
Backdrop Control (can be in stage scripts)
when [green flag] clicked
wait until < (score) > (5) >
switch backdrop to [Concert v]
Full Paddle Script
Simple & elegant:
when [green flag] clicked
forever
set x to (mouse x)
end
That's it. Paddle built with drag and drop programming�no complex code needed.
Scratch Game Enhancements � Take It to the Next Level!
Once you've built the basic version of the game, here are some powerful enhancements you can add to make your game more interactive, challenging, and fun:
?? 1. Scratch Pong Game Enhancements: Add Multiple Levels
You can create different backdrops for each level, and increase the difficulty gradually.
How:
- � Add more backdrop scenes like "City", "Jungle", or "Underwater".
- � When score reaches 5, switch to level 2.
- � When score reaches 10, switch to level 3, and so on.
wait until <(score) > [10]>
switch backdrop to [Next Level v]
change [ball speed] by (2)
? 2. Scratch Pong Game Levels Tutorial: Increase Ball Speed After Each Point
To make the game progressively harder, increase the ball's speed after every few points.
How:
- � Introduce a variable: `ball speed`
- � Update the ball movement block: `move (ball speed) steps`
- � Every few points, increase speed:
if <(score) mod 5 = 0> then
change [ball speed v] by (2)
end
?? 3. Scratch Lives System Tutorial: Add Player Lives & Game Over at Zero
Instead of ending the game immediately when the ball hits the red line, you can give the player 3 chances (lives).
How:
- � Create a variable called `lives` and set it to 3.
- � When the ball touches the red line:
change [lives v] by (-1)
wait (1) seconds
go to x: (0) y: (100)
point in direction (pick random (45) to (135))
- � If `lives = 0`, then stop all.
?? 4. Scratch Pong Game Sound Effects Tutorial: Pop, Cheer & Game Over Sounds
?? Scratch has a built-in sound library. Add a bounce, paddle hit, or game over sound to make it lively.
if < touching [paddle] ?> then
play sound [pop v]
You can also add background music with looping:
when green flag clicked
forever
play sound [game-music v] until done
end
?? 5. Scratch Ball Color Effects Tutorial: Rainbow Bounce on Paddle Hit
Use "change color effect", glow trails, or emit particles when the ball hits the paddle. It adds polish and visual feedback.
change color effect by (25)
set ghost effect to (30)
Also, add a particle sprite and clone it on every paddle hit.
?? 6. Show a "Game Over" Screen
Create a separate sprite called "Game Over" text that only shows when lives = 0.
when green flag clicked
hide
when [lives v] = (0)
show
This improves the user experience and brings closure to the game.
?? 7. Scratch Custom Blocks Tutorial: Reusable Code for Cleaner Pong Game
Use My Blocks to create modular code, like `bounceOffPaddle`, `checkGameOver`, or `updateLevel`. This improves organization and teaches coding abstraction.
Why These Enhancements Matter
Implementing these upgrades lets you practice deeper Scratch programming skills like:
- � Nested conditionals
- � Cloning
- � Custom variables
- � Modular design
- � Difficulty balancing
- � Event triggers and game states
If you're using Scratch coding classes or teaching coding games for kids, these enhancements offer amazing opportunities to go beyond basics while reinforcing foundational concepts.
Scratch Bouncing Ball Game: Summary of Key Skills Practiced
Build a Bouncing Ball Pong-Style Game in Scratch 3.0
| Skill Category | Concepts Covered |
|---|---|
| Motion | Ball movement and bounce |
| Sensing | Paddle and line collisions |
| Variables | Score and lives |
| Conditionals | Touch checks, level change logic |
| Loops | Forever motion and checking conditions |
| Events | Starting and stopping with green flag |
| Backdrops | Scene transitions |
Step-by-step beginner guide: Setup sprites/backdrops, code ball motion and bounce off paddle/edges, add scoring with variables, game over logic, and enhancements like levels, lives, sounds, visual effects, multi-ball cloning, and custom blocks for modular code.
Total Time: 60 minutes
Scratch Pong Game Setup: Add Sprites & Backdrops Tutorial
Delete the default cat sprite. Add ball, green paddle, and red line sprites from the library. Position paddle near bottom, red line at base. Add Boardwalk and Concert backdrops.
Scratch Ball Motion Tutorial: Start Bouncing Ball on Green Flag
Code the ball to move at 45� angle in a forever loop, bouncing off edges automatically.
Scratch Ball Bounce Coding: Paddle Collision & Score Increase Tutorial
Detect paddle touch: increment score, random reflection (30-60�), wait 0.5 seconds.
Scratch Pong Paddle Control: Follow Mouse X Tutorial
Make paddle follow mouse horizontally (y fixed).
Scratch Game Over Logic: Stop All on Red Line Touch Tutorial
End game when ball hits red line.
Scratch Scoring System Tutorial: Create & Display Score Variable
Initialize and show score variable.
Scratch Backdrop Switch Tutorial: Change Background at Score 5
Switch backdrops at score thresholds.
Scratch Pong Levels Tutorial: Increase Ball Speed After Each Point
Speed up ball progressively.
Scratch Lives System Tutorial: Add Player Lives & Game Over at Zero
Track lives; end at 0.
Scratch Pong Sound Effects Tutorial: Pop, Cheer & Game Over Sounds
Add audio feedback.
Scratch Ball Color Effects Tutorial: Rainbow Bounce on Paddle Hit
Visual flair on hits.
Scratch Ball Wrap Around Tutorial: Teleport to Opposite Side
Seamless screen wrap.
Scratch Multi-Ball Pong Tutorial: Clone Extra Bouncing Balls
Add chaos with clones.
Scratch Custom Blocks Tutorial: Reusable Code for Cleaner Pong Game
Modularize bounce logic.
FAQ: Frequently Asked Question
| Question | Answer |
|---|---|
| How to make a bouncing ball in Scratch? | Forever loop: move 5 steps, if on edge bounce, point towards paddle on touch. |
| How to code paddle in Scratch Pong? | Go to x: mouse x in forever loop. |
| How to add scoring in Scratch games? | Create score variable, change by 1 on paddle bounce. |
| What is bounce off edges in Scratch? | Motion block: auto-reverses direction on screen edges. |
| How to clone multiple balls in Scratch? | Repeat 3: create clone of ball; each clone moves independently. |
| Best age for this Scratch Pong tutorial? | Ages 7-12: Motion for young, enhancements for older. |
| How to add sounds to Scratch Pong? | Play "pop" on bounce, "cheer" on score. |
| Remix ideas for bouncing ball game? | AI paddle, power-ups, multiplayer. |
Final Thoughts
Congratulations! You now have the full Scratch bouncing ball game built in Scratch:
- � Learn important programming concepts�motion, sensing, variables, control
- � Create a Pong�style interactive playing field
- � Add visual interest (backdrop switch)
- � Stop condition built in
- � Editable & remixable for future creativity
?? Watch now on YouTube � Follow along step-by-step and pause as needed.
This Scratch bouncing ball game is just the beginning. From here, you can build:
- � A full arcade-style game
- � Multiplayer pong (2 paddles)
- � A breakout-style game with blocks to destroy
- � Or evolve this into a mobile game prototype
?? Ready to Build Your Own Pong Game?
Building a bouncing ball Pong game in Scratch is an excellent way to learn fundamental game development concepts. Whether you're a beginner or looking to teach kids programming, this project covers essential skills like motion, collision detection, scoring systems, and game state management.
If you enjoyed this tutorial, be sure to share it with fellow educators or parents who want their kids to learn Scratch programming through fun, interactive games.
- Don't forget to check out the full video tutorial by Kodex Academy here: ?? Watch the full Pong Game with Bouncing Ball Tutorial
- Like, comment & share the video
- Visit kodexacademy.com
- Subscribe to the Kodex Academy YouTube channel for deeper Scratch content.
Happy coding with Kodex Academy! ??
Share This Tutorial
Help other kids learn Scratch game development! Share this tutorial with friends and family.