Demo
Scratch breakout game tutorial
In this Scratch breakout game tutorial we will be looking how to remake a simple version of this classic game, as well as giving you some extension challenges to complete!
Tutorial Video
Tutorial Video
Stage & Sprites
Stage
Here is what your finished stage will look like, with the bat, ball and bricks. We have used sprite cloning to create all the bricks except one!
Sprites
Here is what sprites you will end up with.
Bat Code
Bat Code
This is the code for the bat, nice and simple. It just needs to match it’s x coordinate to the x coordinate of the mouse.
Ball Code
Ball Code
The ball has two main scripts. The first script (on the right) gets the ball to move and bounce off the edge of the screen, the second script(left) gets the ball to change direction when it bumps in to the bat or a brick.
Brick Code
Brick Code
The brick code needs to create all the clones of itself, to fill the screen with bricks. It also needs to keep track of how many lives each brick has left.
Stage Code
Stage Code
The stage code chooses what backdrop to display.
Extensions
Extension Challenges
Easy
- Make it so that you ball speed increases every thirty seconds.
- Add a start screen / start button.
- Add sound effects to your game.
Medium
- Make it so that the bricks change colour when they are hit.
- Make it so that some bricks have different hit points or some are unbreakable.
Hard
- Add multiple levels and multiple difficult options to your game