Bat and Ball
This video shows you how to create a simple bat and ball game in Scratch.
Scratch programming concepts covered include:
- Create and draw two sprites.
- Use of the keypress control block and the Change Y motion command for moving the bat when the arrow keys are pressed.
- Use of the move and turn motion blocks to move the ball with a forever control block.
- Use of the if conditional control block and the touching sprite sensing block to discover when the bat hits the ball.
- Use of the random and plus number blocks to help the ball bounce off the bat.
- Import and play a simple sound.
This project might be improved in several ways:
- Use the mouse to control the bat movement.
- Add a second bat for a two player game.
- Add a variable to keep score and add a point each time the bat hits the ball.
- Add a line to represent a goal along the back wall and give the computer a point each time the ball hits the goal.
- And another goal on the opposite wall for the player to score a goal.
- Have two bats controlled by each player.