brick breaker scratch tutorial
Brick Breaker Scratch Game involves the player bouncing a ball off of the paddle, and hitting bricks. If the ball hits bricks, then they disappear. The game is won when all of the bricks disappear and the game is lost if the player misses the ball.
We only need 4 sprites for this game – Paddle, Ball, Line and Bricks.
Paddle can be controlled either using mouse or keyboard. The paddle is pretty easy to code, just a couple of simple instructions.
Tip: If the paddle hits the ball, make it smaller to make the game harder!
Place the ‘Line sprite’ at the bottom of the screen. Make sure it covers the whole stage, but is completely below the paddle.
This is the difficult bit now. But also the bit where the game starts to come together.
Click to select the Ball sprite. Insert the pick random block and type in -75 to 75. you’ll make the ball sprite bounce around the screen.
A. Bounce Off the Walls: Make the ball bounce when it hits an edge using the ‘If on edge bounce’ block.
B. Bounce Off the Paddle: Make the ball bounce,When the ball hits the paddle.
C. Bounce Off the Line: Every time the ball touches the ground, one life is lost. If the ball touches the Line 3 times, stop the game completely!
Brick Breaker game needs lots of bricks. One way to do this is to get one block working, and then just copy and paste your working block to make more! Lots of work.
Another easy way of making more copies is through Cloning.
Cloning should be used whenever a project should have many similar sprites doing similar things. Create one Brick sprite and then clone it using ‘create clone of myself’ block from “Control”. Steps involved in creating Clones:
Imagine if you duplicated the sprites instead of cloning them. Then, if you wanted to change the code or color, you’d have to change it to all 112 Brick sprites. Cloning saves you a lot of time!
The bricks are pretty simple to program – they only need to do two things.
The brick should appear at the start of the game and disappear when the ball touches it. Keep “score”, which will increase by 1 when the brick is hit by the ball.
Always start the game with our main background by adding this code to the backdrop
Insert the Lives block into the equals block from the Operators category. Type the number of lives needed to lose the game.
When the number of lives reaches 0, the game will stop and display a Game Over Screen.So let’s first create a new Game Over backdrop:
Insert the Score block into the equals block from the Operators category. Type the number of points needed to win the game.
When the number of score reaches 112 (Total number of brick), the game will stop and display ‘You Win” Screen.
To download the project files of the project How to make Brick Breaker Game on Scratch Click here. Also go through the another ineresting scratch 3.0 project of Animate Your Name using scratch 3.0 here,
Here's a step-by-step tutorial to create a platformer game similar to Super Mario in Scratch:…
Here's a step-by-step tutorial to create a Whack-a-Mole game in Scratch with code snippets: 1.…
About Game: In Spot The Difference Game, the player has to spot the difference between…
In this scratch tutorial, you will create a memory game in which you have to…
In this article, we are going to teach you how to program your owncustomized version…
About Duck Hunt Game: This is a remake of the classic video game Duck Hunt.…
This website uses cookies.
View Comments
Hi, this weekend is nice for me, as this time i am reading this great educational article here at my house. Rebeka Syd Noman
In traditional Brick Out, the ball bounces off of the bricks.
Sweet blog! I found it while browsing on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there! Thanks