Day 3 Unit 1
Unit 1.
Maze Game – continue
We will continue with the Maze game!
Welcome back, we are continuing with the maze game. In the last unit, we made the sprites follow where your mouse pointer is going.
Now we will enforce the rule that the sprite has to stay within certain colors in your backdrop, allowing them to only follow certain paths, like a maze!
To learn how to do that, let’s watch this video.
https://csfirst.withgoogle.com/c/cs-first/en/game-design/maze-game/stay-inside-the-lines.html
Maze Game – If-then statements
Now that the rules of the game are built, we need to define the conditions to win. We will say that the user will win the game when the player sprite goes through the maze and catches the goal sprite without touching the boundaries.
The if, then statement you’ll create will read something like this: If touching the goal sprite, then say, “You win!”
Let’s watch this video to learn how to code the winning condition.
https://csfirst.withgoogle.com/c/cs-first/en/game-design/maze-game/using-if-statements-to-win.html
You can also add extra to your games.
https://csfirst.withgoogle.com/c/cs-first/en/game-design/maze-game/add-ons.html
You can create obstacles in your maze path, keep track of the time that users take to finish till the goal post, and redesign your maze. Have fun on your games at home.
Great work! Let’s share and show our work.
add your project to our studios.
- Click Share button on the top of the page.
- Click on +add to studio button at the bottom of the page
- Choose 2023 summer code camp.
- Click okay
If you are super excited about game development, and want to do extra work at home, check out the race game in the optional work: https://mirahan.faculty.unlv.edu/summercode/class/day-4-optional-race-game/