{"id":152,"date":"2006-03-13T00:13:00","date_gmt":"2006-03-13T08:13:00","guid":{"rendered":"http:\/\/eschatologist.net\/blog\/?p=152"},"modified":"2014-04-23T12:38:10","modified_gmt":"2014-04-23T20:38:10","slug":"making-better-games-with-test-driven-development","status":"publish","type":"post","link":"https:\/\/eschatologist.net\/blog\/?p=152","title":{"rendered":"Making Better Games with Test-Driven Development"},"content":{"rendered":"<p>Noel Llopis (<a href=\"http:\/\/www.gamesfromwithin.com\/\">Games from Within<\/a>) and Sean Houghton, <cite><a href=\"http:\/\/gamesfromwithin.com\/backwards-is-forward-making-better-games-with-test-driven-development\">Backwards Is Forward: Making Better Games with Test-Driven Development<\/a><\/cite>:<\/p>\n<p>> One of the questions we had when we jumped into TDD is<br \/>\n> whether it was going to hold for high-level code. We had<br \/>\n> seen in practice from previous projects that we can<br \/>\n> certainly do TDD to create low-level and intermediate-level<br \/>\n> libraries (math, collision, messaging, etc). But would it<br \/>\n> really work for high-level code that would build on<br \/>\n> low-level code?<br \/>\n><br \/>\n> The answer is an unconditional yes. We have developed a<br \/>\n> full codebase doing TDD from the start, and we had no<br \/>\n> difficulty writing high-level code with TDD. Things like<br \/>\n> character state machines, game flow, or specific game<br \/>\n> entities were done through TDD without any problems, and<br \/>\n> greatly benefited from the TDD approach.<\/p>\n<p>Noel&#8217;s blog is great, and this paper is being presented at the 2006 Game Developers Conference.<\/p>\n<p>Noel and High Moon Studios have been a lot of pioneering work using Extreme Programming in the game development space.  Game development can <em>definitely<\/em> make good use of Extreme Programming to manage the development process, dramatically improve the quality of code, and do wonders for scheduling accuracy and schedule predictability.<\/p>\n<p>Extreme Programming in game development also presents special challenges due to the exploratory nature of a lot of the work, as well as the highly-interactive nature of the software itself.  As Noel points out, you wind up writing much more finely-factored code when doing TDD, which will be alien to a lot of game developers but will help greatly with maintenance, debugging, and the ever-more-important portability.  (Not just between Windows and Mac OS X, but also between Xbox and PlayStation 2 and Nintendo GameCube and Xbox 360 and PlayStation 3 and Nintendo Revolution&#8230;)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Noel Llopis (Games from Within) and Sean Houghton, Backwards Is Forward: Making Better Games with Test-Driven Development: > One of the questions we had when we jumped into TDD is > whether it was going to hold for high-level code. We had > seen in practice from previous projects that we can > certainly do&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[12,121,32,22,16,7],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-technology","tag-agile-development","tag-extreme-programming","tag-games","tag-programming","tag-test-driven-development","tag-unit-testing"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p74loH-2s","_links":{"self":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":2,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":262,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions\/262"}],"wp:attachment":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}