Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We now introduce game programming and graphics with the Ogre 3D graphics engine. Created in 2000 by Steve Streeting, Ogre is an open-source project maintained by the Ogre team at www.ogre3d.org. First, we discuss basic issues involved in game programming. Then we show how to use Ogre to create a simple game featuring a play mechanic similar to the classic video game Pong®, originally developed by Atari in 1972. We demonstrate how to create a scene with colored 3D graphics, smoothly animate moving objects, use timers to control animation speed, detect collisions between objects, add sound, accept keyboard input and display text output.