Game Development Reference
In-Depth Information
Chapter 4
Quickly Build
an Input-Driven Game
All games are driven by user input, but depending on how the game behaves between user actions,
a game may be one of two types. One type is the action game, in which the events on the screen
unfold whether or not the user provides any input. Action games are explored in Chapter 5. In this
chapter, we are going to look at games that wait for the user to make a choice. Games of this type
include puzzle games and strategy games. In this chapter, we refer to them as input-driven games.
Although the coolness factor of input-driven games is definitely less than that of action games, many
successful games of this type are on the market. From Minesweeper to Sudoku to Angry Birds,
these types of games have captured large audiences, and so it is important to understand how this
type of game is implemented. Figure 4-1 shows the typical life cycle of an input-driven game.
Start game
Setup
Wait for user
User performs
action
No
Did user action
end game?
Update game
state
Yes
Animate state
change
End game
Figure 4-1. Coin Sorter—a simple input-driven game
67
 
 
Search WWH ::




Custom Search