Copyright by Daniel Schuller

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 5. The Game Loop and Graphics

Computer games come in many genres, from abstract puzzle games like Tetris to turn-based strategy games like Civilization to fast-paced first-person shooters like Half-Life. All these games, and all computer games, are programmed in a similar way.

How Do Games Work?

The most important way a game communicates with the player is via the TV screen or computer monitor. It’s quite common to hear about frame-rate in games. A good frame-rate is from 30 frames per second to 60 frames per second. But what does frame-rate actually mean when programming a game?

A single frame is the time between screen updates. The computer program is responsible for updating the screen with new information at least 30 times a second. Computers ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required