-
Notifications
You must be signed in to change notification settings - Fork 1
Game Design
In a game map, we can see all players that stand or move, candies that are exploding, and tiles that can be breakable.
A player can have 4 states, standing state, walking state, trapped state, and dead state. The four state can be transferred to each other depending on the game design. Here is the relation between the 4 states.
A player will be initialized in a standing state at the start of the game. When a player is not pressing any key, he/she will be in standing state too, and the direction of the player was the direction he/she was walking towards. The player can be moved to a walking state when pressing any direction key.
A player will be in a walking state when he/she press a direction key, the direction of the player is walking towards is the input key direction. The player can be moved to a standing state when not pressing any key.
A player will be in a trapped state when he/she are exposed to the flame of candy explosion, in other words, he/she is in the range of the candy explosion. The player will be trapped in a jelly and cannot walk or drop candies at this state.
A player will be dead when he/she is trapped in the jelly after 5 seconds. The player will be removed from the game or revive after the death depends on the game map
A candy will explode 5 seconds after it is dropped.