Variables as game state
Let’s put together the things we’ve learned in Scratch and make more interesting programs!
First, fill out the conditions on this guessing game.
Then, choose TWO of the following projects to complete by the end of Friday. Remember that I expect you to put in consistent effort at your level. Someone working hard and accomplishing less will get a better score than someone who is unfocused be races through all the projects.
- Scratch maze:
Write a program for your sprite to complete a maze. You should include a timer so that the game ends after a certain amount of time and a counter to keep track of how many times the user has gone outside the boundaries. If the user completes the maze with time and lives remaining, a congratulatory message should be shown. You may find the following bit of script useful for making the sprite follow the user’s mouse cursor:

“Pacman”
Create a game in which a sprite must “eat” (go over) as many other sprites as possible in a given amount of time. The player sprite should be controlled with the keyboard arrow keys and should get one point for each thing “eaten”. Here is what your stage might look like:

- Pong
Extend your ball bouncing program so the ball bounces at angles off paddles. Your paddles should be controlled with the keyboard. Use a timer to make the game end after a certain amount of time. Use variables to keep score for the two players. You could also have one of the players be controlled by the computer (artificial intelligence!) or have your ball speed up over time. - Quiz game
Create a game that allows users to practice some skill like writing out colors in Spanish or multiplying two numbers. For math-related quizzes, you won’t need anything extra, but to test the user on words, you’ll need to figure out how to use lists. The rest of the code will be similar to the guessing game. - Reaction timer
Create a game that challenges the user to press a certain key (like the space bar) as quickly as possible. A “host” sprite should say how long a certain trial took and ask if the user wants to play again.




