Day 4 Unit 3
Unit 3. 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 during the weekend.
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 2021 Race and Maze Games.
- Click okay
If you are super excited about game development, and want to do extra work during the weekend, check out the race game in the optional work: http://mirahan.faculty.unlv.edu/summercode_2021/class/day-4-optional-race-game/
Don’t forget the reflection survey for today, and see you next week!
http://mirahan.faculty.unlv.edu/summercode_2021/class/day-4-survey/