This category of tutorials covers some of the more advanced things that you can do in XNA that don’t specifically fall under another category. (For instance, HLSL and shaders are an advanced component of XNA, but they are covered in their own category.) The tutorials here assume that you have done quite a bit with the 2D and 3D tutorials, but each tutorial states what it expects you to know in advance, and links to the tutorials that you should go through in case you haven’t done them yet.
Viewports and Split-Screen Games
3 Oct 2021
Many multiplayer games will take the screen and split it up into different areas for each player. This tutorial covers how you can do this using viewports in XNA.
Rendering to a Texture
3 Oct 2021
In XNA it is easy to take your entire game and render it to a texture, which you can then do all sorts of things with.
You’ll have a Texture2D
object, and by now, you can probably think of a thousand ways they are used.
Really, the possibilities are endless, especially once you get into HLSL and effects.
This tutorial will show you how to render to a texture using RenderTarget2D
objects, and give you a bunch of ideas about how it could be used.
Video Playback
3 Oct 2021
As of version 3.1, XNA easily allows you to play videos in your XNA game! Playing videos is extremely simple to do, and is used quite commonly in games. This tutorial will walk you through the basics of playing video.
The Game Loop
3 Oct 2021
The first tutorial on general game architecture, this tutorial discusses the game loop design pattern and describes how XNA implements it. Nearly every game will use a game loop as a part of the underlying architecture for the game. XNA gives this to you for free, but in upcoming tutorials, we’re going to learn how to fine-tune this. Because of that, it will be worth taking the time to understand how the game loop works.
GameTime
: A Game’s Heartbeat
3 Oct 2021
This tutorial covers some details about the GameTime
class and TimeSpan
struct, which are used to provide you with important information about the timing of the game loop.
This will be helpful to understand, before we get into how to customize and control the game loop in our game.
Time Steps
3 Oct 2021
This tutorial covers how to control the timing of the game loop, including choosing between fixed and variable time steps (frame rates), selecting the time for a fixed time step, and how to manage the code changes needed to take advantage of a variable time step.
Cracking the GameTime
Problem
3 Oct 2021
This tutorial covers some details about the GameTime
class and TimeSpan
struct, which are used to provide you with important information about the timing of the game loop.
This will be helpful to understand, before we get into how to customize and control the game loop in our game.
Extracting Raw Color Data from a Texture2D
3 Oct 2021
It’s fairly common to want to pull out raw color data from a Texture2D
object.
This tutorial covers how to retrieve color data from a Texture2D, as well as for only a subsection of the image.
This also covers how to convert the 1D array that is normally returned into a 2D grid that matches the image size.