More Fun with SpriteFonts


A while ago, I posted about pre-rendering text to improve runtime performance when using XNA SpriteFonts. Since then, I’ve managed to complete a game (Robot Legions, currently up for peer review) using my XNA codebase and got to try out my text pre-rendering solution in a real project. It worked out pretty well, but there were a few features that I wished I had implemented ahead of time. Well, while Robot Legions was being play-tested, I went ahead and implemented some of those features. Now I’ll describe those features and share a bit of (hopefully) helpful code that will let you use them in your own games. Continue reading

On Game Music


You know, there is some really great game music out there. Really memorable stuff that can instantly transport you to a different state of mind.

Here’s the thing though. While talking with some fellow game devs the other night, we got onto the topic of old 8-bit / 16-bit era chiptunes and how great we thought they are. Then, we started talking about how, despite all the iconic tunes we could remember from that era, we couldn’t think of nearly as many great examples of video game music from more recent games.

That got me wondering. Why did we have so many fond feelings for the game music of yesterday, but not nearly as much for the music of today’s games? Is it just nostalgia at work, or is there something else at play?
Continue reading

Using CLRProfiler to Take Out the Trash, Part 2


In last week’s post, I described how I used CLRProfiler to identify a couple parts of my code that were producing garbage every frame. One related to equality comparisons with my ActorState struct and another involving System.Objects being produced when I called RuntimePropertyInfo.SetValue(). This time, I’ll talk about what I did to fix those two problems. Continue reading

Using CLRProfiler to Take Out the Trash, Part 1

As cutesy as it may be, I’m growing rather fond of my garbage collection count display. I’m especially fond of it because it helped me find garbage collections occuring in places I never expected them to happen. Such as my title screen for example:

Ack! Look at all those garbage cans, I mean recycling bins (reduce, reuse, recycle, folks!)

That’s a lot of garbage collections for a “static” title screen. Now, how to find out what’s causing all that garbage to be created… That’s where Microsoft’s CLRProfiler comes into play. Continue reading