Pixel perfect collision detection using GPU occlusion queries

Ladies and gentlemen, I hereby present my final joke of 2008: Q: what do you get if you cross a stencil buffer with an occlusion query? A: pixel perfect collision detection! Ok, the joke sucks. But I think the technique has merit: Temporarily disable writing to the color buffer Draw a shape into the stencil…

9

Zune battery versus hard drive

I made it back from a fantastic vacation in Thailand to find Seattle covered in snow. I’m pleased to report that my attempts at making a battery efficient Zune game worked out pretty well. On the return flight I listened to music for 8 hours, while playing my Freecell game for at least 2, yet…

0

Zune landscape mode

My Zune Freecell game runs in 320×240 landscape mode, rather than the default 240×320 portrait orientation. Unfortunately, the XNA Framework does nothing to help you render rotated scenes. Fortunately, you can do this rather easily by drawing everything to a rendertarget, then rotating that as a postprocess. But unfortunately, copying the entire scene via a…

6

Zune battery efficiency

I’m going on vacation to Thailand tomorrow (touch wood). But I’m more worried about the flight itself than the current political unrest. My partner Tracy is prone to fidget, plus she has a major Freecell addiction. Combining a 14 hour flight with suddenly going cold turkey on Freecell doesn’t strike me as too good an…

2

So many buttons on the gamepad

My girlfriend (not a gamer) is addicted to Word Soup. I (also not much of a gamer) am enjoying browsing through the many Community Games, admiring their tremendous variety, creativity, and (at least in some cases polish. But here’s the thing: too many of these games don’t respond when I press buttons on my controller!…

2

Content Pipeline assemblies

One of the more confusing things for newcomers to the XNA Framework Content Pipeline is figuring out how (and why) to split your code across multiple assemblies. First off, let’s examine the flow of data through the pipeline: My choice of colors is not random. In fact, knowing why I colored some boxes blue but…

14

Serializing collections of shared resources

Tomasz emailed me a good question today: “Very good reading about IntermediateSerializer. I was wondering however if this is possible to use it to serialize a Collection of elements which shall be serialized as shared resources. When I use [ContentSerializer(SharedResource = true)] for a Collection the collection itself is treated as a shared resource. This…

13

Releases

Many collections of lovingly arranged zeros and ones have recently wound their way through the tubes from our private development systems onto the public servers; some obvious, others maybe less so… Assuming you haven’t been living under a rock this last few weeks, you probably noticed that Game Studio 3.0 is out (those of you…

0

The sky’s the limit

Skies are one of the most important yet easily neglected graphics in a game. In a typical 3D world the sky can occupy as much as a third of the screen, so having a good one can do wonders for overall visual quality. The great thing about skies is that you don’t need fancy shading…

3

Detail textures

I cannot leave the subject of texture compression without mentioning detail textures. These are up there with environment maps in the pantheon of awesome but underappreciated rendering techniques. Simple, efficient, and they look great. You can think of detail textures as a kind of compression. Or maybe a simple form of procedural texture generation. They…

7