C#
Advertisement

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[]

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[]

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

LoadContent[]

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[]

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

Draw[]

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

Advertisement