Game of Tag

While in Taiwan, I got laid up with an allergic reaction to fruit. Because I couldn’t go outside or walk around much, I spent a lot of quality time with the computer, finally getting around to a lot of things that I wanted to do.

One of the things that’s been on my list for a long time is to write a game. I had one in mind, and was making good progress on it. I was showing my wife how I’d developed enough code to let me move little figures around on the screen. I took a few minutes and added a second one so she could move one at the same time. Spontaneously, we broke into a game of Tag.

It hit me then that the game I had originally planned to write was going to be a lot more complicated, and that the complicated bits had nothing to do with DirectDraw. So I sat down, and over the course of the next day and a half, finished Tag version 1.0. I’m posting it here .

I’ve commented the code pretty extensively, so hopefully if you’re interested in DirectDraw you can use it as a resource. I don’t plan to write a DirectDraw tutorial like my DirectSound and Direct3D tutorials any time soon, because frankly I’m not sure how many people are interested in managed DirectDraw. Microsoft hasn’t changed DirectDraw since DirectX 7, there’s zero documentation on it, and most or all of the functionality it provides is available in Direct3D. But I found managed DirectDraw a little easier to understand than Managed Direct3D, and it still works just fine.

Anyway, go ahead and download Tag and give it a try – the README file will get you started. Let me know if you like it. Or better yet, improve it and send me a copy. I have about a jillion ideas for how to make it even better, but I’ve got to move on to other things for now.

Oh, you’ll need to be sure to install the managed bits of DirectX 9.0. Since the default install doesn’t put the managed part on your computer, you’ll either need to install the SDK (you’ll need to do this if you want to play with the code) or follow these directions .