In response to my earlier rant about Valve doing tests before pushing out updates into production, I thought I’d do some research on the subject myself.
WARNING: If you’re not at all interested in game programming or just general programming, you may want to consider skipping this post.
Before I go too much further I highly recommend the series of articles titled Stepping Through the Looking Glass: Test-Driven Game Development by Noel, which I highly recommend anyone going into the software development industry as a career to read. I will be referencing this series throughout this post. Part One goes through what test driven development is and how it’s important. The meat of the series is Part Two where Noel goes into how to incorporate unit tests and more specifically how to incorporate them within games.
Now, the first thing I thought about when doing my previous rant was, “How can you test something that relies so heavy on graphics?”. Well, in part 2 of the series Noel states,
The best thing you can do is forget about low-level graphics. Wrap it up neatly at a really low level in a little library and push it aside. Then you can concentrate on testing everything that uses graphics instead of getting bogged down with the graphics themselves.
Very well put, I must say. Even though the game is driven on graphics to play it, there are still calculations that are being done to do all that and more. Now does Valve have unit tests? I’m not sure, but I’d love to know. I’m quite sure they do. Let’s be honest, they’ve done about 120 updates and nothing as critical as hit detection has been broken. Yes, they have broken quite a bit of functionality, such as rocket and sticky jumps, but nothing that totally cripples the game to where we can’t play unless they fix it.
In conclusion, unit tests, if done properly, can save not only maintenance time when the product first goes live, but as equally important it can save maintenance when new development goes on top of the product for new features.
EDIT: After talking to Sigma I learned that Valve actually did break hit detection…twice! He noted once when Ambassador came out it would always hit and another time demoman pipes would go through targets. Awesome job, Valve! This really lowers my confidence in your TF2 development team. :[







Recent Comments