This is an archive of my old blog (2008–2013), kept online because people still use it. XNA has been discontinued; MonoGame is its open-source successor, and the techniques still apply. Comments are closed.

Other Samples

Here are some samples not belonging to any of the other categories:

  • 2D Pie Drawing
    Update: Here is the sample updated to XNA 4.0. Thanks UberGeekGames. After I've seen some people asking how to do this on the forums, I decided to make a small class that allows us to draw Pies in 2D in …
  • Fog of War
    I've put together a quick sample that shows a way to implement Fog Of War in XNA, for a 3D game. As a word of warning, this is put together in a couple of hours, so it may be hacky …
  • Pie Menu
    For the people who want some UI stuff in XNA, here's a small sample that contains a Pie Menu Component, attached to a cursor. If you don't know what a pie menu is, read about it on wikipedia. Now, about …
  • Wireframe without Z-Fighting
    Sometimes, for debugging purposes, or maybe for some effects, we would like to render a model, together with the wireframe on top of it. A simple way to to this is to first render the model normally, and then render …
  • XNA Game Studio 3.1 Video Sample
    Here’s a sample on how to use the new support for video files in XNA Game Studio 3.1. All you have to do is add the video file (wmv) to your Content project, and you’re ready to use it with …
  • Restoring the Depth Buffer
    A long time ago, when I wrote the Deferred Rendering article, in the last chapter I mentioned adding transparent objects to the rendering pipeline. To do that, we would need to restore the depth buffer, as if the objects in …
  • Voxel Rendering on Zune
    This month's sample is an attempt to voxel rendering on Zune. Unfortunately, the results are not as good as I would have hoped, both from a quality and performance point of view. I tried optimizing the code by using some …
  • PowerPoint in XNA
    This sample might be considered strange... The sample shows a content pipeline extension that allows you to add PowerPoint presentations (.ppt) in your game, and display them as a slide-show inside your XNA application. The Power Point Importer and processor …