O'Reilly logo

Game Coding Complete, Fourth Edition by David Graham, Mike McShaffry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7CONTROLLING THE MAIN LOOP

by David β€œRez” Graham

image

Every game has a series of operations that run over and over to present and update the game to the player. This is the heartbeat that lets you know the game is alive. Games are unlike many forms of software in that even if the player does absolutely nothing, the game still needs to be constantly thinking and processing. A typical main loop may receive and process player input, run creature AI, update animations, update the physics system, run any world simulation that needs to happen, render the scene, and play music and sound effects. Every main loop is different and tailored for each individual ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required