Skip to content
This repository was archived by the owner on Sep 24, 2022. It is now read-only.

Game Design

yijiacc edited this page Apr 2, 2021 · 11 revisions

Map

In a game map, we can see all players that stand or move, candies that are exploding, and tiles that can be breakable.

Player

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.

Standing State

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.

Walking State

A player will be in the 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 the standing state when not pressing any key.

Trapped State

A player will be in the 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 then be trapped in a jelly and cannot walk or drop candies at this state.

Dead 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

Candy

A candy will explode 5 seconds after it is dropped.

Melting state

After a candy is dropped, the candy is then in the melting state

Exploding state

When a candy is in melting state over 5 seconds, it will then be in the exploding state and start exploding to up, down, left, and right 4 directions.

Exploded state

When a candy finishes exploding, exploded() return true

Gameitem

Game items are assigned randomly in the tiles for each new game. Items will be revealed from the breakable tiles when the tiles are hit by candy explosion flame. Game itmes are showing at the bottom of the game screen.

Player can pick up and use game items which are hidden in breakable tiles during the game. There are two types of game items, one type can be used automatically, which means it will take effect to the player who does not have to take any action to use the items. The other type cannot be used automatically, so that the player have to press keys to use the items.

CanAutoUse

Power item can increase the power of the player's candy, which means his/her candy can have a larger explosion range. For example, a player's candy can explode at most 1 cell horizontally and verfically. After he/she gets one power item, his/her candy can explode 2 cells.

SpeedType

Speed item can increase the player's walking speed.

Candy item can increase the candyLimit of a player(the maximum amount of candies a player can drop). For example, if a palyer can drop 2 candies at a time at the beginning of the game, after having 2 Candy items, he/she can drop 4 candies at the same time.

CannotAutoUse

FirstAid

A player can use FirstAid item revive himself/herself when he/she is trapped in the jelly.

Guidelines & Processes

Codebase

Testing

Infrastructure

Clone this wiki locally