scratch, variables, objects
The one-player version will replace one of the player paddles with a black wall from top to bottom. The wall will cause the ball to bounce back to the player. Since the wall “can’t miss,” the score will be the number of times the player successfully hits the ball back to the wall. When the player misses the first time, the game is over.
Your job is to design and write a Scratch program to create a oneplayer version of the 80s video game Pong. You can see what it looks like here
- Topdown design: This approach is when a project is broken down into smaller pieces
so that each piece performs only one function
- Bottomup design: This approach is when several alreadycompleted systems are
integrated together to form a bigger system.
- Most software design is done using the topdown design approach.
We will use the topdown design approach to design the complete Pong game. It will be comprised of several small pieces. The group will divide the work so that each group member will be responsible for implementing one (or more) of the pieces.
Your backdrop can look like this with the wall on the left and the player paddle on the right. (The drawing has an outline around it to make it show better here, but it doesn’t have to be on the backdrop)
- Backdrop: This is the playing area and includes the wall on which the ball will bounce.
￼ * Ball: This will move back and forth across the screen, will bounce off the top and bottom borders of the backdrop, will bounce off the wall, and will bounce off of the player’s paddle. It will have to detect when it moves past the player paddle causing the game to be over.
- Paddle: The player controls the paddle movement using the arrow keys on the computer
- Scoring: Keeping track of the number of times the ball bounces off the player paddle
- Sound: Making Ponglike sounds when the ball bounces off the top and bottom of the backdrop, off the wall, and off the paddle, as well as a sound when the game is over.
- Here is a sample program with a bouncing watermelon that demonstrates how to get a sprite to bounce off the edges of the backdrop
- Here is a sample program that demonstrates how to move through a backdrop but not go through walls.
Unit testing: Each group member create his or her own portion of the project on their own computer and tests it independently from the rest of the systems to make sure that it performs the functions required of it.
Integration testing: When all the components are completed and tested individually, they are integrated together and tested as one.
Scoring: Your project will be scored in several ways:
- Does it work? Groups that implement the basic requirements of the game will get a score of 4. Groups that successfully add one or more features that enhance the game will receive more than a 4 depending on the extensiveness and complexity of the enhancements.
- Questioning: Mr. Jaffe will ask questions of the group members about the code they are responsible for. He most likely will ask questions about the code you weren’t responsible for too.
- Next steps: The group will get a grade for a discussion about the “next steps.” What existing features would you improve, and/or what features would you add to make the program better?
- Group assessments: Each group member will give the other members a score based on their contribution to the group.