{"id":4749,"date":"2009-08-30T09:49:54","date_gmt":"2009-08-30T13:49:54","guid":{"rendered":"http:\/\/www.shamusyoung.com\/twentysidedtale\/?p=4749"},"modified":"2009-08-31T11:14:40","modified_gmt":"2009-08-31T15:14:40","slug":"hammer-rant","status":"publish","type":"post","link":"https:\/\/www.shamusyoung.com\/twentysidedtale\/?p=4749","title":{"rendered":"Hammer Rant"},"content":{"rendered":"<p>As I mentioned in an <a href=\"?p=4729\">earlier post<\/a>, I&#8217;ve been mucking about with Hammer, the Valve level editor.  Doing so provides an interesting peek inside of Valve studios.  When Daikatana came out in 2000, there was a joke about how the game was polished, but mired in the previous technological generation and old design philosophy.  It went something like, &#8220;Diakatana: Best 1997 game released in 2000.&#8221;  Well, Hammer is my favorite level editor of 1999.<\/p>\n<p><!--more-->Hammer was a perfectly fine level editor when they began work on Half-Life 2.  But due to the long development cycle, by the time the thing came out in 2004 the editor was getting really, really long in the tooth. I heartily approve of Valve sticking to the 2004 graphics tech, but a side effect of that is that they are also sticking to their 1999 level editor, which is now woefully out of date.  There is no two ways about it.  I don&#8217;t care how brilliant their artists are or how familiar they are with the tools: This sucker is slowing them down. <\/p>\n<p>Imagine you&#8217;re a sculptor.  You&#8217;re making a statue in granite.   Only, you can&#8217;t make cuts with your eyes open.  You have to figure out what you want to do, then close your eyes and tap away with your hammer and chisel.  When you&#8217;re done and you want to see the result of your cuts, <strong>it takes you five minutes to open your eyes<\/strong>.  (Although you do have an undo \/ save system, which a non-hypothetical sculptor won&#8217;t have.  Then again, a real sculptor never has to restart his chisel because the dang thing crashed again.) Yes, a good artist can still turn out phenomenal work under these conditions, and Valve has some of the best.  A good sculptor will learn to make a lot of cuts and avoid stopping to look at their work until they really need to.  As the <a href=\"?p=4744\">Guitar Hero + Rubik&#8217;s Cube video<\/a> proved, the human brain can be trained to do some remarkable things.  But if you&#8217;re driven to produce work of high quality (which Valve clearly is) then a system that punishes the artist for iteration is painfully self-defeating.<\/p>\n<p>The root of the problem is that the editor only gives you a vague notion of what the level will look like.  The editor shows the world with flat directional lighting.  No special effects, no fog, no shadows, no positional sources, no sunlight, no shaders of any kind, no bump mapping and no cube mapping.  If you want to see your work in-game, you must compile the level and then alt-tab over to the game and load it up. (Note: do not even think about making levels unless your machine has the oomph to run several hefty applications at once without passing out.)  This takes a long time, much longer than a comparable level might take in another game engine. <\/p>\n<p><table width='480'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/studio17d.jpg' class='insetimage' width='480' alt='What the level looks like in the editor.' title='What the level looks like in the editor.'\/><\/td><\/tr><tr><td class='insetcaption'>What the level looks like in the editor.<\/td><\/tr><\/table><br \/>\n<table width='480'  cellpadding='0' cellspacing='0' border='0' align='center'><tr><td><img src='https:\/\/www.shamusyoung.com\/twentysidedtale\/images\/studio17a.jpg' class='insetimage' width='480' alt='What it actually looks like in the game.' title='What it actually looks like in the game.'\/><\/td><\/tr><tr><td class='insetcaption'>What it actually looks like in the game.<\/td><\/tr><\/table><\/p>\n<p>Look at the above pictures and note the stage floor.  Black in the editor, glossy white in-game.  This is because it&#8217;s &#8220;shiny&#8221;, and thus the editor is unable to show you how it would really look.  There are a lot of unpredictable differences like that.  If you were making that texture you would need to keep restarting the game every single time you made a change. I&#8217;m sure everyone reading this is aware of how long it takes to launch a game, load a level, and exit the game again.  Ouch.  If you were fiddling with the shadows and coloring in the above level you&#8217;d have to sit through a compile and a loading screen every time you tweaked things, just to see how it all looked.  <\/p>\n<p>People developing for the Unreal engine don&#8217;t have this problem.  The editor shows you exactly what the game will look like, lighting and all.  You only need to fire up the game when you want to test gameplay.  You do need to rebuild \/ compile once in a while, but an UnrealEd compile is way faster than a Hammer compile, you need to do them less often, and when it&#8217;s done you see the results right away instead of alt-tabbing to the game, sitting through the loading screen, and then running around the level to see the parts that interest you. (For comparison, my one-room auditorium is a 15-second compile if you set it to &#8220;quick and crappy&#8221;. In Unreal, the rebuild would be a blink-and-you&#8217;ll-miss-it job.)  In Doom3, the game IS the editor. Just open up the console and type &#8220;editor&#8221; (or something along those lines, it&#8217;s been a while) and &#8220;poof!&#8221; you&#8217;re editing the level you were just playing.  The lights and geometry update in realtime, so you don&#8217;t need long compiles or loading screens.  You just work and work until you&#8217;re ready to playtest.  It&#8217;s completely <a href=\"http:\/\/en.wikipedia.org\/wiki\/WYSIWYG\">WYSIWYG<\/a>.  I haven&#8217;t tried it myself, but reportedly the Crysis editor does this one better: You get seamless visual editing, and you can test physics within the editor.  <\/p>\n<p>(Also, the Hammer approach to BSP geometry is very, very old-school.  Half-Life 2: Episode 2 looks like a current-gen game.  It&#8217;s gorgeous.  But under the hood they&#8217;re using optimization techniques that were out of date before HL2 even hit the shelves. It&#8217;s pretty technical, but if people actually want to read about how BSP tech has changed over the last decade I&#8217;ll take a stab at explaining it.)<\/p>\n<p>This handicap wouldn&#8217;t be so bad for other developers.  But given Valve&#8217;s high artistic standards and their near-obsessive approach to lighting and atmosphere, the limitations of Hammer must be positively crippling.  I&#8217;m actually shocked they&#8217;re turning out episodes as fast as they are.  I&#8217;ve fired up the new version of Hammer they&#8217;re using for Left 4 Dead, and it&#8217;s basically the same thing.<\/p>\n<p>Valve is up against a wall here. I&#8217;ve said in the past that changing your tools is a painful move.  To update hammer now would mean throwing out most of it and building a new WYSIWYG editor on top of the game engine itself, which is how most other developers are doing things.  A programmer (a good, talented programmer, not some cross-eyed intern) could blow the better part of a year on a job like that. And then there would be upheaval as the thing was rolled out, and it would slow the work of all of your projects:  Episode 3, Left 4 Dead 2, Team Fortress, and whatever other projects they have cooking.  It&#8217;s very much a pay-me-now-or-pay-me-later situation.  They have to pay this update cost sooner or later.  On one hand, the old tools are adding a ton of friction to their development process.  On the other hand, the fewer times you go through that in the life of your company, the better.<\/p>\n<p>It&#8217;s a shame things they turned out the way they did.  They don&#8217;t actually need 2009-level tools.  But the leap from 1998 to 2004 was a huge one, and if they were using 2003 level tools (which would include WYSIWYG editor) they would be in far, far better shape. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I mentioned in an earlier post, I&#8217;ve been mucking about with Hammer, the Valve level editor. Doing so provides an interesting peek inside of Valve studios. When Daikatana came out in 2000, there was a joke about how the game was polished, but mired in the previous technological generation and old design philosophy. It [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120],"tags":[],"class_list":["post-4749","post","type-post","status-publish","format-standard","hentry","category-videogames"],"_links":{"self":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/4749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4749"}],"version-history":[{"count":0,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=\/wp\/v2\/posts\/4749\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shamusyoung.com\/twentysidedtale\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}