CGDD W2: Fake Game
A. Playing Demo
The inspiration of this game:https://www.bilibili.com/video/BV1Cu41197dZ/?spm_id_from=333.337.search-card.all.click&vd_source=1b16d263d8bc90f438faabdc3eec7cf9
B. Developing Process:
1. Check the game flow:
The players should be able to get points to win the game. If the points earned can’t meet a certain amount when reaching the destination, they’ll lose the game.
2. Define important variables
In this game, the most important variable is objectCount, which stores the amount of blocks the player has got. It is linked to the UI text on the top left corner to show the current point, and determines the hight of the blocks the player controls.
To check whether the player has won the game or not, I defined winStatus to check whether the cubes have reached the star. If the collider on the star has detected objects with tag “followingObject”, winStatus will be set to 1. Once this public static is set to 1, the UI will show “YOU WIN” and end this game. If the cube has reached the end of this game (which is the long block) and winStatus is not 1 at that time, another variable named loseStatus will be set to 1, and the UI will show “YOU LOSE” and end the game.
3. Write scripts and attach scripts