Geeks With Blogs


Google My Blog

Catch me at: The List!

My InstallScript Utility Belt My Amazon Wishlist
My Standard Disclaimer

Chris G. Williams Beware: I mix tech and personal interests here.

Those of you that do Game Development, how many of you are also doing TDD (Test Driven Development) as part of the process?

I've recently made a promise to myself that I would start doing more TDD in my projects (ok ok, doing "any" would qualify as more, technically...) and I find myself at a loss for what to actually test.

It seems easier in traditional projects, but in game development where you rely on random things and generated things and player input things, I'm curious what you (those of you that do it) choose to test.

Please share your stories in the comments section.  Thanks!

Posted on Friday, March 13, 2009 4:16 PM | Back to top

Comments on this post: GD TDD

# re: GD TDD
Requesting Gravatar...
One of the problems (especially with XNA), is that unless you are -very- careful, it is a PAIN to properly test your code. You have to work really hard to separate all logic/behavior out from details about rendering, framerate, temporal changes, etc.
Left by Jason Olson on Mar 13, 2009 6:44 PM

# re: GD TDD
Requesting Gravatar...
At the moment, in my current project GameUnnamed, I am working on the Random Dungeon Generation code. Testing this has proven to be interesting because even though I can't test the randomly generated maps themselves, I can test all the various helper routines that generate the maps. I'm also finding that I'm doing a fair amount of mocking for my tests, but I don't have a basis of comparison for whether its more or less than other people's non-game projects.
Left by Chris G. Williams on Mar 13, 2009 6:49 PM

# re: GD TDD
Requesting Gravatar...
I think the key to it is definitely getting the separation right between the UI and the underlying game logic. If you can exercise the latter without being coupled to the former, then you've won half of the battle.
Left by Phil Booth on Mar 14, 2009 4:43 AM

Your comment:
 (will show your gravatar)

Copyright © Chris G. Williams | Powered by: