Harnessing the XNA Game Loop Via the GameTimer Class
In XNA, responding to user input, updating your app’s state, and drawing content all happen periodically within the game loop. The game loop is the heart of every XNA game, and understanding it is fundamental to XNA development.
Unlike pure XNA games, which use the Game
class for the game loop, hybrid apps rely on the Microsoft.Xna.Framework.GameTimer
, which is unique to the phone.
In a pure XNA game, a Game
class is used instead of an Application
class. XNA games rely on overloading Game
class methods that are specific to the game loop, such as Update
and Draw
, whereas hybrid apps (Windows Phone 7.1 apps that combine XNA and Silverlight) and apps that rely on XNA APIs, such as the sound effect ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.