Game Development Reference
In-Depth Information
The player can shift rows to the left or to the right using the mouse or the touch screen (if the game
is played on a phone or a tablet). The goal is to find matching combinations of three adjacent jewels
in the middle column. A combination of three jewels is valid if each of the properties is either the
same for all objects or different for all objects. For example, a yellow single-diamond object, a blue
single-diamond object, and a red single-diamond object form a valid combination, because the
color is different for each object and the shape and number are the same for all objects. A yellow
sphere object, a yellow double-diamond object, and a yellow triple-ellipse object also form a valid
combination, because all three objects have the same color, a different shape, and a different
number. The combination yellow diamond, red double sphere, and blue double ellipse is not valid,
because although the color and the shape are different for each object, the number for the diamond
object is different from the other two. The combination yellow diamond, red double sphere, and blue
triple ellipse, on the other hand, is valid.
Once the player has found a valid combination by shifting the rows around, they press the space
bar, the jewels that form the combination disappear, the remaining jewels fall to fill the empty slots,
and three new jewels fall from the top of the screen. When there are two or three combinations at the
same time in the middle column when the player presses the space bar, extra points are awarded
and an overlay is shown on the screen to indicate that a double or triple combination was made.
In the following chapters, you develop this game. If you want to play the complete version to get a
feel for how the game works, run the example belonging to Chapter 17!
Search WWH ::




Custom Search