Code Samples and Utilities
Unless otherwise stated, all source code and programs are licensed under the terms of the Microsoft Public License (Ms-PL). If you don't agree to those terms, do not download any of the source code or programs. Downloading an item constitutes acceptance of the terms of the Ms-PL or, if a different license is indicated for a specific item, of the other indicated license.
Bonus news! Most of the samples have now been modified to include the MIT License. If for some reason the Ms-PL terms do not suit you but the MIT License terms do, you may now use any of the code samples that have had the MIT License added to them pursuant to the terms of that license in lieu of the Ms-PL.
XNA
The following are various code samples and utilities I've written to help XNA developers. Certain utilities (i.e. the ones with CCGame files) require that you be a registered XBLIG developer. More information on this process, including qualifications, can be found in the Xbox LIVE Indie Games FAQ at the App Hub.
- Interpolation Sample:
C# - Interpolation_SampleCS.zip -
VB - Interpolation_SampleVB.zip -
Related Blog Post
- Convert to Dxt Content Pipeline Extension:
C# - Dxt_CPE_SampleCS.zip -
VB - Dxt_CPE_SampleVB.zip -
Related Blog Post
- Content Pipeline Extension Sample (XNA 4.0):
C# Source Code -
VB Source Code -
Related Blog Post
- BinaryReader/BinaryWriter Sample Code:
BinaryReaderWriterSample.cs.txt -
Related Blog Post
- DragAndDropGame (XNA 4.0 - Windows-only):
C# Source Code - VB Source
Code -
Related Blog Post
- Sprite Guides plugin for Gimp 2.6:
sprite-guides.scm -
Related Blog Post (includes installation instructions)
- AccelerometerInput GameComponent (XNA 4.0 - WP7):
C# Source Code -
Related Blog Post
- CheckMemoryAllocationGame (XNA 4.0 - Windows):
C# Source Code -
VB Source Code -
Related Blog Post
- RenderTarget2D Sample (XNA 4.0 - Windows, WP7, Xbox 360):
C# Source Code - VB Source
Code -
Related Blog Post
- Motion Blur Sample (XNA 4.0 - Windows):
Source Code
- Title Safe TV Test: Source Code
- CCGame Package
- Title Safe Screenshot Checker:
Source Code - ClickOnce Install (requires Windows XP SP3, Windows Vista, or Windows 7)
- Guest Account Sign In Utility: C#
Source Code - VB Source Code
- CCGame Package