Check back here for hints and clues on how to build your version of SPARK PONG! At the end of the week, we’ll post the tutorial to show you how to build the game!
This week’s project is to recreate the classic game PONG using Scratch. Your game needs to be 2 player, it needs to have the ability to pause and un-pause when you press the ‘p’ key, and the ball should start at a random spot (when you press ‘space’) from left to right, at a random angle, but in the direction to give it the most clearance.
Here’s what you’re shooting for:
Hint #1 – Even though your first instinct might be to use the “When (up) key pressed” or “When (down) key pressed” for the up/down movement, this will make your movement choppy. Try using a forever loop with one of the “key (?) pressed” Sensing gems instead.
Hint #2 – If you’re having issues with the ball bouncing off the paddles at a weird angle, you can create a “hitbox” that is invisible but is the right shape to make your ball bounce correctly. Create a rectangular shape that is the same size as your paddle and then hide it using the “Looks” blocks. Then, change your logic to look for instances where the ball touches the hitbox instead of the paddle.