‘using’ IDisposable objects

This isn’t fully game related, but I see so many people posting code on forums that looks like this: Stream stream = storageContainer.CreateFile("MyFile.txt"); StreamWriter writer = new StreamWriter(stream); writer.Write("Stuff"); writer.Close(); stream.Close(); I cringe at this sight. IDisposable is an interface that objects leveraging native handles or resources will almost always implement to ensure the native…

17

Build-time content pipeline usage in Windows games

One of the problems that some folks have hit in XNA Game Studio 4.0 is not being able to use the build-time content pipeline assemblies in their Windows games. Generally this is desired when developers are trying to save out an object using the IntermediateSerializer so they can use the resulting XML as a template…

3

What storage is right for me?

Developers moving across all three of the platforms supported by XNA Game Studio might find themselves working with their storage code to create a single codebase that works across all three. One of the main confusions can be the issue of what actually works on each of the platforms. Here’s a small table that quickly…

2

Encoding and decoding images in XNA Game Studio 4.0

In previous releases of XNA Game Studio, there were the Texture2D.Save and Texture2D.FromFile methods for encoding and decoding images, but they only worked on Windows. In XNA GS 4.0, we introduced a few new methods: Texture2D.SaveAsPng, Texture2D.SaveAsJpeg, and Texture2D.FromStream. These methods replace the old Save and FromFile methods and are available across all three of…

0

Don’t build more than what you need

One of the more abstract lessons I learned through making my AppWeek game was to build for the current project. I am, in my spare time, trying to build what one could call a 3D game engine. I’ve been (very) slowly building up code in various areas that will hopefully enable me to efficiently build…

1

Don’t reinvent those wheels

Still continuing on about my AppWeek game, another bit that really helped me out was leveraging existing code for pieces of the game I didn’t really know how to make in a short time. While I do have a decent amount of generic code I’ve accumulated over the years, there are some pieces that I…

5

Batch your polygons

Continuing my little series on how I created my AppWeek game, let’s talk about triangles, specifically those that make up a level. When working on a 3D game, you’ll more than likely reach a point where you need to optimize your rendering. You’re either making too many state changes or too many draw calls. Generally…

2

The delights of DualTextureEffect

When I started on my AppWeek game, I wanted to build the game using the Reach profile as much as possible so I could more easily reuse the graphics part on Windows Phone. I was pretty close; the only piece of my game that didn’t directly convert to Windows Phone was the 3D Particles I…

5

My AppWeek 2010

As Shawn blogged yesterday, we wrapped up AppWeek last week and got to see a lot of cool games from the team. I put in a bit of overtime on my game and ended up with a split-screen first person shooter on PC and Xbox 360 and a single-player tech demo of it on Windows…

3

I helped ship XNA Game Studio 4.0

Allow me to be a bit nostalgic here for a post. It’s December 2006 and I’m a college kid in Grand Rapids, Michigan. XNA Game Studio Express was just released and promised the opportunity to make games more easily with C# and an API built for rapid creation of games. Beyond that, XNA GSE allowed,…

12