Your First Game!

Alright, I’ll be honest from the get go… this won’t really be a “game”. It won’t be interactive, and it most certainly won’t be fun. What it will be though is a game based on the XNA Game Framework and will use the graphics card and all that good stuff. Consider it the “Hello World” of gaming if you will. Let’s see how this will work!

First thing is to make sure you installed XNA Game Studio by following this post. Once you got that up and running, let’s create our “Hello World!” game.

Fire up your Visual Studio (Pro or C# Express) and click on File menu, New and then Project. You should see something like this:

image

Notice how we expanded the Visual C# node to reveal the XNA Game Studio node? Make sure you do that. This way you will be able to pick from the Game Studio project templates. Pick Windows Game (2.0) and hit Ok.

When the project is done creating itself, you are ready to test it out! Hit F5 and the project will build and run. If all goes well, you should see the default CornFlowerBlue window:

There you go! That’s your very first game! It’s running on the XNA Game Framework which in turn uses Microsoft DirectX.

In the next post, we’ll break down the source code to see what is going on and understand how this works. It’s pretty simple actually. To make this a true “Hello World”, we’ll even add a “Hello World” text in this game next time ;)

Thanks for reading! I'd love to hear your thoughts, feel free to leave a comment below. Don't forget to subscribe to my RSS Feed!

One Response to “Your First Game!”

  1. Atef Marzouki Says:

    I just wanted to thank you for mentioning “hello world” which made it very easy to find your posts for a beginner like myself :)

Leave a Reply

The page's WebCounter count says that you are visitor number Visitor Counter by Digits
FireStats icon Powered by FireStats