Game Programming, Etc.

Games, programming, and related topics — by John Giors

Archive for March, 2006

Steering behaviors

Posted by jgiors on 2006-03-27

I've seen this steering behaviors article before, but I stumbled across it today and thought I should save a link to it.

Posted in Games, Programming | Leave a Comment »

Test-driven development

Posted by jgiors on 2006-03-23

This Test-Driven Development (TDD) paper was presented yesterday at GDC (the Game Developers Conference). Not that I was present to see it…[Why do I miss the conference so often? *sigh*]

The idea of TDD is to program in this sequence:

  1. Write test case(s).
  2. Write code.
  3. Refactor code.
  4. Iterate.

It's similar to typical "unit testing", but on a broader scale. I'm not sure what to make of it yet, but it's intriguing to say the least.

Posted in Programming | Leave a Comment »

Reading published source code

Posted by jgiors on 2006-03-22

Reading published source code can be a productive way to learn programming techniques, especially for someone learning how to program.  But, to be honest, I haven't read through that much published source code.  I've downloaded id's source code for Doom and Quake games and spent a little time browsing them (the code is surprisingly clean), and I have occasionally looked at other published source, but only infrequently.

With a bit of a "shame on me" attitude, I thought to myself "Why didn't I spend more time learning from published source code?".  It seems that I passed up a really good opportunity.

But, on a little more introspection, I realized there was a bona fide reason I hadn't taken that opportunity:

Read the rest of this entry »

Posted in Programming | Leave a Comment »

Windows XP environment variables

Posted by jgiors on 2006-03-21

I just found out that Windows XP stores environment variables in the registry under the key “HKEY_CURRENT_USER\Environment”.  This means that variables can be changed from a batch file by calling regedit.

That’s useful because a batch file runs in it’s own virtual space.  If you use a command like “SET MYVAR=MYVALUE”, the environment variable will disappear when the batch file’s console window is closed.  Regedit solves the problem.

There is a caveat, however…it appears that the environment vars do not take effect until the operating system is explicitly notified that the environment vars have changed.  Rebooting should work, but is obviously inconvenient.  If I ever get a chance to experiment with this, I’ll post more at that time.

Posted in Programming, Windoze | Leave a Comment »

Compressed memory caching

Posted by jgiors on 2006-03-07

I found this article which proposes storing virtual memory pages in compressed memory.  I am mostly interested in the techniques used for memory compression–they appear to be simple and effective.

Posted in Programming | Leave a Comment »

HTML tags

Posted by jgiors on 2006-03-03

I just found this HTML Code Tutorial which seems to have some good information about HTML tags.

Posted in Programming | Leave a Comment »