View Single Post
 
Old 02-04-2014, 03:54 PM
snarfblam's Avatar
snarfblam snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

Using a timer is generally an uncommon method of driving a game engine. It's easy for beginners and works well enough for the simplest of games, but as you move on to more advanced projects it quickly becomes inadequate. Timers can be slow or imprecise, and worse, the precision can vary between machines.

Some games use an idle loop. In VB or C# this means updating your game every time the Application.Idle event fires.

In other cases, the timing of the game engine is managed by a graphics library. The game loop updates game logic, renders graphics, and then displays them on the screen, the latter two being done via the graphics library. XNA addresses this at a high level, helping you separate game logic from rendering logic and managing the timing and frame skipping. Lower-level libraries like DirectX and OpenGL leave some of this work up to the programmer.

The determine which method is used by a particular game, you would generally have to look at the code and see.
__________________
C# _VB.NET _
Reply With Quote