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.

Samples

  • Direct3D for Windows Phone 8
    1. Getting Started with Direct3D on Windows Phone 8 Basic introduction, setting up a new project, adding DirectXTK. 2. Converting Textures to .dds Convert textures do .dds manually, or automatically using a MSBUILD script 3. Dissecting the empty Windows Phone …
  • 2D Skeletal Animation
    This sample shows a method of animating 2D objects using skeleton-based animation. An explanation of the technique can be seen here. Skeleton-based animation is much smoother than sprite-based animation, and often consumes less memory. The source code: SkeletalAnimation.zip
  • Dynamic 2D Shadows
    Update: The XNA 4.0 version for Windows Phone 7 is available here: HardShadowsWP7.zip This sample shows an implementation for dynamic 2D shadows in XNA. The code is based on an article from GameDev.net, written by Orangy Tang, but only implements …
  • Lightning Sample
    This sample shows an implementation of lightning rendering in XNA GS 2.0 The technique and math is based on a DirectX10 sample made by NVIDIA. Since the NVIDIA sample was made for DirectX10, I had to move most of the …
  • Postprocessing on Windows Phone 7
    This is a 3-part series of samples showing how you can do some basic post processing effects on Windows Phone 7: Part 1: Negative Image and Color Boost, using Color Blending Part 2: Random Noise Part 3: Radial Blur and …
  • Mass Effect: Dialogue
    Game: Mass Effect, made by Bioware Replicated Feature: The looks and behaviour of the dialogue system and dialogue wheel More Information: Using the Sample: This sample is composed of four projects. First, the ZSquare.Dialogue project contains the 4 main classes …
  • Rim Lighting
    This time, we have a smaller sample. This sample shows the implementation of a "rim lighting" shader, customizable by a series of parameters. I observed this kind of effect in Super Mario Galaxy screenshots, and it looked like a nice …
  • Shader-Based Dynamic 2D smooth shadows
    This sample shows a method of drawing soft dynamic shadows in 2D using shaders. A detailed explanation of the technique can be seen here. The algorithm used ensures that any object of any shape can cast shadows, and the complexity …
  • World of Goo: Cursor
    Game: World of Goo, made by 2D Boy Replicated Feature: The shape and behavior of the mouse cursor More Information: Using the Sample: The most important element of the sample is the Cursor class. This is a DrawableGameComponent the handles …
  • Other Samples
    Here are some samples not belonging to any of the other categories: