XNA Tutorials

Welcome to the XNA Tutorials, the largest and easiest to use collection of XNA 4.0 tutorials on the Internet! There are plenty of other sites out there, but as far as I know they are either much smaller than this, or way out of date, which is a big deal, since so much changed in version 4.0.

You may also find my MonoGame tutorials of interest. MonoGame is an open source port of XNA that runs on a very wide variety of programs, and may ultimately have a longer lifespan than XNA.

About These XNA Tutorials

XNA is an extremely powerful and easy to use set of tools for game making, created by Microsoft. If you are interested in making your own game, XNA is the way to do it, and my tutorials on this website should help you get going.

I have divided these tutorials up into multiple categories. Each category has a simple flow to it, which will take you from the very beginning and teach you everything you need to know about the topic to get started with your game.

Below is a diagram of the ordering of the tutorials. Once you are done with a set of tutorials, you should be well prepared to start on anything after it.

TutorialFlowChart.png
StartIcon.png

1 - C# Crash Course

If you have never done anything with programming, start with this crash course on the basics of programming with C#.

If you already know the basics of programming, feel free to skip this set of tutorials.

Note that this set is still a work in progress.
C# Crash Course


StartIcon.png

2 - Getting Started

Before you get started, there are a few things you will need to know and do in these four tutorials. These tutorials explain a little bit about what XNA is, how to install the necessary (free) software to use XNA, and how to do some of the basic things in an XNA game. Once you have been through these few tutorials, you will be able to go on to just about anything that you want, though I recommend going to the 2D tutorials next, and then the 3D tutorials, and pick up the rest of the tutorials as you need them.
Getting Started


2DIcon.png

3 - 2D Tutorials

These tutorials cover the basics of doing 2D stuff, like drawing text and images, as well as 2D animation, and some fancy effects in 2D. After you have completed these tutorials, you should be able to make some pretty interesting 2D games with XNA.
2D Tutorials


3d100.png

4 - 3D Tutorials

These tutorials should get you going with a 3D game. They cover things like drawing models, animation in 3D, and some simple effects, like lighting, and fog. These tutorials should really get you going on any 3D game.
3D Tutorials


controller100.png

5 - Input Tutorials

No game is complete without getting input from a user. When you get to the point in your game development where you are ready to get input from the user, take a look at these tutorials. They cover all sorts of input, including keyboard input, mouse input, and input from an Xbox controller.
Input Tutorials


audio100.png

6 - Audio Tutorials

Adding sound effects and background music to a game really makes the game come alive. These tutorials will teach you the basics (and some more advanced stuff) about playing all types of audio in your game. When you are ready to add audio to your game, come check out these tutorials.
Audio Tutorials


packaging100.png

7 - Publishing Your Game Tutorials

When your game is complete, you will probably want to be able to give it to your friends, or even sell it. These tutorials will help you get started with the basics of publishing and distributing your game to others.
Publishing Your Game Tutorials


utility100.png

8 - Utility Tutorials

During the time that I have been working on these tutorials and teaching this stuff to students, I have come across a large variety of small random things that people occasionally like to do with their game. These tutorials are all small, and cover some random aspect of creating XNA games that you may find useful. At any point in your game development, you might want to check out these tutorials, which cover a broad variety of topics from creating games that run in full screen, to displaying the cursor, to changing the window size.
Utility Tutorials


content-pipeline100.png

9 - Content Pipeline Tutorials

XNA comes with a feature called the content pipeline, which manages all of your content, like 3D models, audio files, textures, images, and so on. The content pipeline is extensible, and you can add on anything you want to it, which is pretty nice. These tutorials cover more detailed information about how the content pipeline works, and how to create extensions for it. When you want to know more about the content pipeline, or how to extend it, come back to these tutorials.
Content Pipeline Tutorials


math100.png

10 - Game Math Tutorials

Sometimes games require some fancy math to complete the game. These tutorials cover some of the more common math related problems that arise while making games.
Game Math Tutorials


physics100.png

11 - Game Physics Tutorials

Games can also require an understanding of physics in order to function well. These tutorials cover some of the more common physics related concepts that may come up while you are making your game, including collision detection.
Game Physics Tutorials


2d3d100.png

12 - 2D/3D Combination Tutorials

Once you have an understanding of 2D graphics and 3D graphics, you will likely want to combine them together. These tutorials will show you how to solve some of the problems that arise when you are doing this.
2D/3D Combination Tutorials


primitives100.png

13 - Primitives Tutorials

Occasionally, when you are doing stuff with a 3D game, you want to be able to do more than just draw models that have been loaded in. XNA is built on top of DirectX, and so you have the ability to draw primitives, like lines and triangles (or lots of triangles to create interesting surfaces). Once you have an understanding of the basic 3D tutorials, try out these tutorials, which will go through the process of drawing with buffer objects, to draw all sorts of primitives.
Primitives Tutorials


effects100.png

14 - Effects & HLSL Tutorials

Today's graphics cards allow you to program them. The old way, the fixed function pipeline, allows you to only do specific effects while rendering. But now that you can program the graphics card, the possibilities are limitless. These tutorials teach you how to program the graphics card using a programming language called HLSL by using effects. Once you have a good understanding of the basic 3D tutorials, check these tutorials out.
Effects & HLSL Tutorials


advanced100.png

15 - Advanced XNA Tutorials

Once you have completed the stuff in the 2D and 3D tutorial categories, you might want to look at this set of tutorials, which discuss some of the more advanced topics in XNA that aren't covered in one of the other categories.
Advanced XNA Tutorials


RB's Game Development Kit

I have also created a list of free software that you can download and use in your game development: RB's Game Development Kit


Need Extra Help?

I am constantly adding more tutorials to this site, as well as modifying older tutorials to better help you learn and understand XNA. If there is anything that you think would help you (missing tutorials, clarification, etc.), let me know, or post something in the Forum. My goal is to help you be able to make the game of your dreams!

Also, if you get stuck on terminology, I have created a glossary of terms that are commonly used in XNA, programming, and game development that might be able to help.


The Future of These Tutorials

Like I've said, I'm constantly working on these tutorials. I have plans for what else to add, but I welcome your suggestions. Please see the page on my future plans for these tutorials.