Game Development Reference
In-Depth Information
In case of a dynamically created room, the room is said to be in a wait state upon
creation. This state signifies that the game has not begun yet. In the case of a
statically created room, all rooms start out in this state. This is also the time when
other players may join the room. During the wait state, the host may still be allowed
to change the room attributes, such as the difficulty level, or depending on the
game developers' preference, the room properties are all set when the player is in
the process of creating the room. The room goes into a play state when the host
broadcasts a start message to all the players.
As you can see from the illustration, the room is created in wait state, and goes into
play state when the game is started. The room object will be purged in case of a
dynamically created room. The room is usually purged when all the players in the
room leave.
The host may decide to start the game at any time, except for games that must have
a minimum number of players. For example, a card game may require at least four
players to start or a game of tic-tac-toe may need at least two players to start. In the
case of racing game, the host may wait for as many players as he or she wishes.
The server will prevent more than the maximum number of players from joining.
Player states
As with rooms, the players within the game room may also be in one of
the following two states:
• Ready
• Not ready
Search WWH ::




Custom Search