« TDD | Main | Notes on Tomb Raider Legend »

June 12, 2006

Comments

Whilst there's not a obvious correlation between this and Machinima work (although I have this nagging feeling there's a non-obvious one), I'm still finding your thoughts on the subject fascinating. Please do keep blogging your progress with TDD games design.

> [TDD] is like a drug

That says everything. You've finally gotten what TDD is all about :-)

Seriously, it's great to see you're enjoying it and it's effective. One comment based on personal experience:
> I'm up to forty "tests" and hundreds of "CHECK" statements

I would recommend to try to keep tests small and limited to a single CHECK statement (unless you're testing two obvious consequences of a single action). But certainly avoid doing action, CHECK, action, CHECK. It takes nothing to set them up as two separate tests and it'll be a lot clearer when one of them breaks.

Also:
> Hard to tell just how many tests to write. You could write tests forever, checking every weird boundary
> case, entire tables of inputs and outputs, and on and on. Or you could write no tests at all.
> Somewhere between zero and infinity is the right amount, but where?

Remember, you're not trying to do comprehensive tests to verify things are "correct". Just that they do what you want. I only write tests that force me to write new lines of code. I actually don't spend too much time worrying about boundary conditions, only the obvious stuff (a player's life shouldn't go below zero).

Have fun and give us another update in a few weeks to see how things are going.


--Noel

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.