Game Constructor

Initializes a new instance of this class, which provides basic graphics device initialization, game logic, rendering code, and a game loop.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework.Game (in


public Game ()


Although the GraphicsDeviceManager constructor requires an instance of Game, if the application does not otherwise require an instance of Game it is often more desirable to implement the IGraphicsDeviceService interface to provide the same services that would be provided by the GraphicsDeviceManager.

Similarly, when creating a new ContentManager, if no instance of Game is otherwise required by the application, it is often more desirable to create a new class that implements the IServiceProvider interface rather than creating an instance of Game just to create a new instance of GraphicsDeviceManager.


/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
    using (Game1 game = new Game1())

See Also


Game Class
Game Members
Microsoft.Xna.Framework Namespace


Xbox 360, Windows 7, Windows Vista, Windows XP