C# XNA is an extension off of C# that helps programmers make 3D and 2D games. It was discontinued in 2014, but is still widely used today.

Usage Edit

In XNA, there is a Game1 class, which inherits from the Game class. The Game1 class recieves a few methods from Game1: Run, LoadContent, UnloadContent, Update, and Draw, just to name a few.

Run Edit

The Run method will start the game. This will call LoadContent, and call Update and Draw every 1/60 of a second.

LoadContent Edit

This method is used to instantiate most of the objects in the Game1 class. The Game1 Content property allows for loading files in the project, like inages and audio.

Update Edit

This is where all the game logic occurs. All object interaction and handling is done here.

Draw Edit

The Draw method is where the objects are drawn on-screen, using a SpriteBatch.

Community content is available under CC-BY-SA unless otherwise noted.