<< Chapter < Page | Chapter >> Page > |
XNA is a very sophisticated C# application. It isn't simply a program in the sense of the programs that you have seen so far in this course or aword processor or a spread sheet. Instead, it is a software framework designed specifically to make it easier for you to create computer games using the C# programming language.
Here is part of what Wikipedia has to say about a software framework:
Software frameworks have these distinguishing features that separate them from libraries or normal user applications:
In short, a framework is a computer program that helps you to write computer programs . The description given above is a good match for the XNA framework.
Up to this point in this collection of modules, all of the programs that I have explained have been Visual C# Console Applications .
Assuming that you have Visual C# 2010 and XNA Game Studio 4.0 Refresh installed on your computer, if you start Visual C# and select New Project from the File menu, you have a choice of about a dozen different kinds of projects that you can create within Visual C#. One of thosechoices is to create a Console Application .
When you create a Console Application, a project tree is created on your disk containing numerous folders and files. One of those files is a C#source code file named Program.cs . This file, which is the skeleton of a new class named Program , is opened in the editor pane in Visual C#.
The skeleton code in the file looks something like Listing 1 when it first opens.
Listing 1 . Initial contents of the file named Program.cs for a Console Application.
using System;
using System.Collections.Generic;using System.Linq;
using System.Text;namespace ConsoleApplication1
{class Program
{static void Main(string[] args){
}}
}
If you select Start Debugging on the Debug menu, the program will run and terminate almost immediately. At that point, theproject tree will have expanded to contain more files and folders even though the program hasn't yet done anything useful.
Notification Switch
Would you like to follow the 'Xna game studio' conversation and receive update notifications?