ScratchData LogoScratchData
Back to abhayjoshi's profile

Pingpong-adv

ABabhayjoshi•Created April 23, 2016
Pingpong-adv
1
0
91 views
View on Scratch

Instructions

1. Click on the “Green flag”: a help screen appears. Read the instructions carefully. 2. Click “Pick level” to select the level of difficulty (1 to 3). 3. For levels 2 and 3, enter the min and max speed for the ball. 4. Click “Start game” to begin playing. If level=1, use the speed ‘slider’ to set the speed of the ball. 5. Press SPACE BAR to serve the ball.

Description

This is a game that two players play with a ball and two flat paddles. The paddles move up and down only. The left paddle belongs to “player1” and it uses the ‘w’ and ‘s’ keys. The right paddle belongs to “player2” and it uses the up/down arrow keys. When the ball touches either of the left/right edges of the screen the opposing player gets a point. There are 3 levels of difficulty. In level 1, which is the easiest, the ball moves at a constant speed, which you can set at the beginning of the game. In level 2, the ball speed varies randomly (within limits of course) every time it touches a paddle. You can set the min and max limits of the ball speed. In level 3, in addition to speed variation, the angle of bounce when the ball touches a paddle also varies (to introduce an element of surprise for the opponent). The first player to exceed 10 points wins the game.

Project Details

Project ID106705673
CreatedApril 23, 2016
Last ModifiedJanuary 12, 2018
SharedJanuary 12, 2018
Visibilityvisible
CommentsAllowed