Elements of Computer Games

Not every game lends itself easily to online play. Multiplayer games in which players take turns moving and single-player games in which players complete against a computer opponent possessing artificial intelligence seem to be the easiest to adapt to Internet play.

One reason for choosing to play a game on the Internet is to experience the interaction with game players around the world. The key to developing a good game is to give players interesting challenges to overcome.

The solutions to these challenges should be intuitive to the players and should gradually increase in difficulty. This allows a game to be learned as the player’s skill increases. A game that produces random results for a given input may not be perceived as an entertaining game.

Genre. The term genre, as used in this chapter, describes a game type. There are many types of computer games. Use of the term genre is a bit controversial among game designers. Some game designers do not believe it is possible to classify every game as belonging to a single genre. Games from the same genre tend to share many attributes (role of the player, use of animation, user interface style, etc.).

Story Line. Most games use some sort of story line to enhance the game. The story line may provide background to give players contexts for their actions (e.g., shooters) or it may actually serve as a script (e.g., role-playing games or interactive fiction) to govern the interactive flow of the game.

Linear story lines have only one possible path to a successful outcome. Nonlinear story lines allow players to choose different routes to follow during the course of game play and may even have different endings, based on the decisions made by each player. It is usually good to make the player feel that his or her actions during the game affect the game’s (and the story’s) ultimate outcome.

Puzzles. In stand-alone games, people are more likely to evaluate a game according to the quality of its story line and graphics rather than the cleverness of its puzzles. However, ingenious puzzles are the heart of interactive fiction or roleplaying games.

Good puzzles can enhance the story line for any game and can assist with character development. Good puzzles can make a good game great, by giving players small challenges to keep them interested in the game while working toward game completion.

Bad puzzles can interfere with the player’s progress toward goals and can prevent players from immersing themselves in the story. Several types of puzzles can be found in computer games. Puzzles may require players to push buttons to copy sequences or discover patterns.

Players may be required to start or stop sequences of actions within a specified time period. A game may require users to construct a puzzle solution by combining clues or following a trail of evidence like a detective. Sometimes puzzles may take the form of word searches, magic squares, or riddles.

These types of puzzles challenge players, and their performance is likely to improve with practice. This keeps players coming back to play again. Puzzles that rely solely on brute force solutions or excessive trial and error tend to discourage players from returning to play again. Puzzles with random results that depend solely on luck and little skill can also make players lose interest in a game.

User Interface. Players expect games to have graphical user interfaces, even if the game does not involve direct manipulation of game objects. Most games found on the Internet are designed to run either from inside a Web browser window or from a dedicated game server.

Games designed to run inside a browser window allow the game designer to make use of a user platform that is relatively machine independent with regard to displaying game graphics and animation. Games designed to run from a dedicated server often require a platformdependent client program to be running on each player’s machine.

The client program would typically handle user input and display-of-game information sent by the server. Games that involve graphical simulations of real-world actions need to have believable behavior, but designers need to remember that they do not need to build a perfect physical model to create fun games.

Most physical actions can be approximated assuming simple Newtonian physics and rigid body elastic collisions. In many games, designers may be able to simplify the detection of collisions between screen objects by focusing on an object’s center of mass and surrounding it with a rectangular bounding box.

In a two-dimensional (2D) graphical system, object collisions are indicated any time the bounding box surrounding one object enters the area surrounded by the bounding box on another object. This allows the game program to speed up the graphical display of the effects of object interactions.

Using discrete-simulation (constant step) techniques can also help with synchronization of simultaneous events. In discrete simulation, the effects of simultaneous events in a given time unit are modeled offline and displayed for the user as if they occurred at the same time.

User interaction devices for Internet games tend to be limited to the mouse and the keyboard, because these represent the base-level devices in the Unix world, where a majority of the World Wide Web servers live.

For multiplayer games, text and voice communication between players seems to be an important social aspect of games. This communication may take the form of requests for technical support or it may simply be “trash talking.”

Although text communication only requires the use of the keyboard, voice communication requires the presence of a microphone and speakers on each player’s machine. Besides graphics and computer animation, multimedia elements that have become part of computer games include sound, music, and video.

Sound and music can enhance the story line of a game in the same way they do movies. Typically, making use of most multimedia formats in a browser window requires the user to download and install a plug-in on his or her local machine for each media type used.

One of the challenging aspects of working with both video and sound in computer games is synchronizing video stream with audio stream so that they seem to be taking place at the same time. The network bandwidth required for streaming either video or audio is substantial for local area networks. The latency or lag time associated with the Internet further complicates the task of media synchronization.