Everything I ever needed to know about programming I learned in Gamergarten

  • Don't block the user from moving her ship while she fires her laser at the space aliens

  • Don't redraw more of the screen than you have to when the aliens move

  • Make sure the sounds start right away when the buttons are pushed

  • It's better to not have a bonus ship go across the screen if its presence makes the game laggy


I love XNA.  Really I do.  Not because I think writing games is the single most important activity on the planet -- although maybe it is -- but because I think it's one of the most educational things a budding programmer can do.

Game development is a great exercise because, even with fancy graphics hardware and super-computer like CPU resources available, it's so constrained.  You always want to get the most out of that hardware because that's what will make your game great.  Real considerations like frame-rate, lag, available textures, are in your face and directly impact the users experience in comparatively easy to understand ways.

Everyone should write a (little) game at least once in their life and I wish more Computer Science students did just that.

Some people have to spend an entire career unlearning callously taught maxims like "You should just let the [compiler|hardware] guys do the optimization", "Don't worry about performance, the [.NET|Java] runtime takes care of that for you." 

If you're in school now, trust me... It ain't so. 

Perhaps more than anything else I could possibly teach a CS student it would be not a datastructure, or a programming language but a basic understanding of the costs of low and medium level operations common in programming today.  Maybe that's why I'm so motivated to talk about performance signatures.

Comments (6)

  1. szurgot says:

    I spent a while writing a Solitaire game engine. Pretty good engine, can handle multiple Solitaire variants, but I had the worst time getting it to drawn on the screen without tearing. This was in pure .NET 1.1 so I never could get it working right. Talk about an exercise in frustration. I’ve still got the code, and keep meaning to try it again with DX or maybe even WPF, though…

  2. Will Dean says:

    I suspect, like me, you also *really* think that people should start by writing games in assembler, preferably on a really small 8-bit micro.

    The dismal perf of so much current software makes me want to weep – it’s tragic that user expectations are so low.

    At least when the Excel team were sneaking in 3d graphical games as Easter eggs we knew that there was still some hard-core talent around at MS.  Of course, they’ve all been taken out into the snow and shot now.

    It’s a great pity that a vast swathe of the world’s developers are sitting in front of VS – a howling example of an app where perf problems clearly miss the cut at every stage.  

    And look at what’s happened to the MSDN viewer over the last decade for another tragic example.

    Recently I read somewhere that the old high-performing-but-not-very-extensible C++ compiler front-end is being re-written to improve Intellisense.

    My depressing prediction: slower compilations, bigger RAM footprint, and just enough improvement in VS Intellisense to cause WholeTomato to give-up.  

    Is there anyone other than you who still cares about perf at MS, Rico?   Do they actually write any code?

  3. st says:

    VS Intellisense is just too snow.  I know many persons have to rename the fea???.dll to disable it.

  4. Wolf Logan says:

    I just found out about this today, and it seems strangely appropriate:


    An eight-core, 32-bit processor, programmable in assembler, BASIC, or its own mid-level language ("Spin"). Nintendo controller ports, and a cartridge slot.

    It’s retro-nostalgic and cutting-edge all at the same time. And reading through the docs, optimisation and performance are always primary concerns. The video system, for example, is done in software — there’s an optimisiation scenario for you!

  5. Sounds like an excuse to plug my game: http://www.gamedev.net/community/gds/viewentry.asp?projectid=297596

    And, yes, I did learn a *lot* from the experience.

Skip to main content