Every step of the tutorial
All 30 steps of “Make Chocobreak”, with the words NutHouse shows you and every hint. Build a bat-and-ball game step by step, and learn how events work.
The steps
-
Let's make Chocobreak!
You're going to make a game where you bounce a ball to smash a wall of bricks. It takes about 20 minutes. Press Next to start.
Press Next when you are ready
-
This is your level
The dark blue box is the level: the stage where your game happens. The grey part around it is off-screen, so players can't see it.
Level tab · Press Next when you are ready
-
Add a paddle
The paddle is the bat you move to hit the ball. Click + Add object, then Balls & Paddles, then Paddle.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Move it to the bottom
Drag the Paddle down near the bottom of the level, in the middle.
💡 Click and hold on the paddle, move the mouse, then let go.
Level tab · NutHouse checks this step for you · Do it for me is available
-
How does it move?
Click the Paddle to see its settings on the right. Under Movement it says it moves with the arrow keys, and Left/Right only is picked so it can only slide sideways. Press Next when you've had a look.
Level tab · Press Next when you are ready
-
Try it!
Press ▶ Play level (or Cmd+R). Use the ← → arrow keys to slide the paddle. Press Esc to come back.
NutHouse checks this step for you
-
Add the ball
Now the ball. Click + Add object → Balls & Paddles → Ball.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Put the ball above the paddle
Drag the Ball so it sits just above the paddle.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Speed up the ball
Click the Ball. Its movement is Bouncing ball: it flies in a straight line. Drag its Speed to 40 or more.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Add a brick
Time for bricks! Click + Add object → Bricks & Blocks → Brick. Drag it near the top-left of the level.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Build a wall
One brick isn't much of a wall. Click the brick, then Make grid… on the right. Choose 10 columns and 4 rows, and press OK.
💡 If the wall goes off the edge, press Cmd+Z, move the brick further left and try again.
Level tab · NutHouse checks this step for you · Do it for me is available
-
What happens now?
Press ▶ Play level. Uh-oh: the ball flies straight through everything and off the screen! Press Esc when you've seen it.
NutHouse checks this step for you
-
Rules make the game
Objects only do clever things when you give them rules, called events: “when this happens, do that”. Open the Events tab.
NutHouse checks this step for you
-
When the ball hits a brick…
Click + New event. Click the Ball, then Collides with another object. Pick the Brick and press Add.
Events tab · NutHouse checks this step for you · Do it for me is available
-
…smash the brick
Now say what happens. In that row, click the empty box under the Brick picture, then choose Destroy.
💡 The columns along the top are things that can do something. Find the brick picture.
Events tab · NutHouse checks this step for you · Do it for me is available
-
…and bounce the ball
The ball should bounce off the brick too. In the same row, click the box under the Ball and choose Bounce.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Test your first rule
Press ▶ Play level and watch the ball smash a brick. It still goes through the paddle, so let's fix that next. Press Esc to stop.
NutHouse checks this step for you
-
Bounce off the paddle
Make another event: + New event → Ball → Collides with another object → Paddle. Then in its row, click under the Ball and choose Bounce.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Keep the ball on the screen
New event: Ball → Position → Leaves the play area. Tick only Top, Left and Right (not Bottom!). Then make the Ball Bounce.
💡 The edges are tick boxes in the settings window. Untick “Bottom”.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Keep the paddle on the screen
The paddle can slide off the screen too. New event: Paddle → Leaves the play area, tick only Left and Right. Then make the Paddle Stop.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Keep score
Back in the Level tab, click + Add object → New → Score. Drag it to the top-left corner.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Points for every brick
In Events, find the row where the Ball collides with Brick. Click under Player 1 (the smiley ☺) and choose Add to score. Type 10 and press Add.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Three lives
In the Level tab, add a Lives object (+ Add object → New → Lives) and put it in the top-right corner.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Losing a life
New event: Ball → Leaves the play area, tick only Bottom. Add two actions: Player 1 → Subtract lives (1), and Ball → Set position: X 0, Y -24, measured from the Paddle.
💡 “Measured from the Paddle” puts the ball 24 pixels above wherever the paddle is.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Game over
When there are no lives left, start again. New event: Player 1 → Compare the number of lives: = equal to 0. Action: Game (🎬) → Restart the game.
Events tab · NutHouse checks this step for you · Do it for me is available
-
A message for winners
Add a Text object (+ Add object → New → Text). In its settings, change the words to You Win! and untick “Visible when the level starts”, so it stays hidden until you win.
Level tab · NutHouse checks this step for you · Do it for me is available
-
Winning!
You win when no bricks are left. New event: Brick → Compare the number of these objects: = equal to 0. Actions: your Text → Show, and Ball → Stop.
Events tab · NutHouse checks this step for you · Do it for me is available
-
Play your game!
Press ▶▶ Play game and play Chocobreak from start to finish. Can you win?
NutHouse checks this step for you
-
Save it
Press Cmd+S (or the Save button) and give your game a name, like Chocobreak.
NutHouse checks this step for you
-
You made a game! 🎉
Want to show a friend? Press Share… to turn your game into a web page. Ideas to try next: draw your own ball in the Sprite editor (double-click it), add a Coin sound when a brick breaks (the Sound column), make the bricks different colours, or add a second level in the Storyboard.
Press Next when you are ready