Interactive Genetic Algorithms in Multi-Agents Systems : Smart grids as an ap...
Beginners XNA
1. Microsoft XNA 3.0:
In the past couple of months I was working on a project, where I had to develop a game on the .Net
framework. While searching about how to design games, I came across an online tutorial about the XNA
game development framework, and was amazed by the flexibility it provides for the developer, even if
he was just a beginner. Before I go into details about what is XNA, let me tell you that this was my first
game. And although my previous knowledge in C# did help me through this project, it is easy to start
with XNA with minimum programming experience.
What is Microsoft XNA???
It is a set of tools (framework) that facilitates game development, code resulting from programming on
this work can target either Microsoft XBOX or Microsoft Windows as a platform. The latest available
version of this framework is Microsoft XNA 3.1.
What do you need to start??
All you need is Visual c# express edition (having Visual studio is better but not necessary), and of course
the XNA game studio (latest version is 3.1).
How it works??
Similar to when you create any new project, when you create a new Microsoft XNA project, you will find
2 pre-created classes, Program.cs and Game1.cs. The first class contains the “main function” where an
instant of the second class is created to launch the game, we don’t edit in the Program.cs, most of the
work is done either in Game1.cs or other classes that we create.
Now when you go to Game1.cs, you will find a set of functions that are already created. These functions
is where you will program your game, these functions are:
1- Initialize: this is where you initialize all the variables, classes, timers… that you will use through
the entire game.
2- Load: here is where you load the graphical and audio content to be used in the game from their
significant files.
3- Update: here is where you write the main algorithm of the game
4- Draw: this is the function that communicates between your code and the graphics device
manager to make the graphics appear on your screen.
What is Next??
If you are interested in starting using XNA, your first stop should be at: http://creators.xna.com/en-US/
Have a nice time Gaming!!!