Developing Game-Themed Applications with XNA Game Studio

Day 1 - Section I: Overview and Introduction
b. The bare bone XNA Application

back to Day-1 main page


Goals: Notice:

Project Creation: Start Game Studio Express

This is our first XNA application. This is a very simple application which is perfect for us to analyze:

Understand the Files and Folder Structure: Open up Microsoft Explorer and navigate to Desktop/SimpleXNA, we observe:

Folder/File  Purpose 
SimpleXNA.sln .sln - this is the solution file of the entire project.
SimpleXNA.suo .suo - this is data file that XNA GS uses. We will not change this files.
SimpleXNA/Game1.cs This file contains the Game1 class. This is the main file we will work with.
SimpleXNA/Game1.ico This is the graphical icon on the title bar of the running program.
SimpleXNA/GameThumbnail.png This is the graphical file for representing this game on the XBOX 360 console. By default, this looks like a some circles
SimpleXNA/Program.cs This is the container class of the Game1 class.
SimpleXNA/SimpleXNA.csproj This is the project description file for the .sln solution file. In general, a solution (one .sln file) can consist of many different projects (many .csproj) files.
SimpleXNA/bin and obj Compile result. As the names suggests, obj contains the compile object files, while bin contains the executable binary files.
SimpleXNA/Properties/AssemblyInfo.cs Description for the project, e.g., name to appear on the window title bar.
SimpleXNA/Content/Content.contentproj This is the content project description file. As will be discussed, fonts, file texture images, and audio wave files are examples of contents. We will need to describe how these contents will integrate into our project via this "content project".
SimpleXNA/Content/bin and obj Build results from the content project.

 


Understand the IDE solution structure: Now, go back to XNA GS,

We can examine some of the files in our project (double click on the files to open them in the editor):


Understand the structure of the application: Now, go back to GSE,

This calling sequence is true for all XNA applications. To build an interactive application, all we have to do is to change the application state according to user input during Update() and draw the changed state in Draw(). In the next two examples, we will examine how to define/draw graphical objects and interactively control graphical objects.


This document and the related materials are developed with support from Microsoft Research Computer Gaming Initiative under the Computer Gaming Curriculum in Computer Science RFP, Award Number 15871, and 16531.


Kelvin Sung
Computing and Software Systems
University of Washington, Bothell
ksung@u.washington.edu