Breakout in Greenfoot: Barb Ericson Ericson@cc - Gatech.edu Georgia Institute of Technology September 2010
Breakout in Greenfoot: Barb Ericson Ericson@cc - Gatech.edu Georgia Institute of Technology September 2010
Breakout
Game Rules
Use the left and right arrow keys to move
the paddle
Use the paddle to hit the ball into the bricks to
get rid of them
Get rid of all the bricks to win the g
game
The ball will bounce off most of the walls, paddle,
and bricks
Breakout
Breakout
10
Breakout
11
Breakout
12
}
}
Breakout
13
Checking Walls
If the ball hit the left wall bounce in x
if (getX() - radius <= 0)
velX = -velX; // negate velocity in X
14
Breakout
15
Additional Ideas
Add sounds
bounce sound and win or lose sounds
16