Hammer Rant

By Shamus
on Aug 30, 2009
Filed under:
Video Games

As I mentioned in an earlier post, I’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, “Diakatana: Best 1997 game released in 2000.” Well, Hammer is my favorite level editor of 1999.

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’t care how brilliant their artists are or how familiar they are with the tools: This sucker is slowing them down.

Imagine you’re a sculptor. You’re making a statue in granite. Only, you can’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’re done and you want to see the result of your cuts, it takes you five minutes to open your eyes. (Although you do have an undo / save system, which a non-hypothetical sculptor won’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 Guitar Hero + Rubik’s Cube video proved, the human brain can be trained to do some remarkable things. But if you’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.

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.

What the level looks like in the editor.
What the level looks like in the editor.

What it actually looks like in the game.
What it actually looks like in the game.

Look at the above pictures and note the stage floor. Black in the editor, glossy white in-game. This is because it’s “shiny”, 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’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’d have to sit through a compile and a loading screen every time you tweaked things, just to see how it all looked.

People developing for the Unreal engine don’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’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 “quick and crappy”. In Unreal, the rebuild would be a blink-and-you’ll-miss-it job.) In Doom3, the game IS the editor. Just open up the console and type “editor” (or something along those lines, it’s been a while) and “poof!” you’re editing the level you were just playing. The lights and geometry update in realtime, so you don’t need long compiles or loading screens. You just work and work until you’re ready to playtest. It’s completely WYSIWYG. I haven’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.

(Also, the Hammer approach to BSP geometry is very, very old-school. Half-Life 2: Episode 2 looks like a current-gen game. It’s gorgeous. But under the hood they’re using optimization techniques that were out of date before HL2 even hit the shelves. It’s pretty technical, but if people actually want to read about how BSP tech has changed over the last decade I’ll take a stab at explaining it.)

This handicap wouldn’t be so bad for other developers. But given Valve’s high artistic standards and their near-obsessive approach to lighting and atmosphere, the limitations of Hammer must be positively crippling. I’m actually shocked they’re turning out episodes as fast as they are. I’ve fired up the new version of Hammer they’re using for Left 4 Dead, and it’s basically the same thing.

Valve is up against a wall here. I’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’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.

It’s a shame things they turned out the way they did. They don’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.

Enjoyed this post? Please share!

201838 comments. Hurry up and add yours before it becomes passé.

From the Archives:

  1. Alan De Smet says:

    Oooooh! Oooooh! I want to hear about how BSP technology has changed over the last decade!

  2. EMK says:

    Me too! :) Honest!

  3. Andy says:

    +1 BSP evolution write up

  4. Ahluka says:

    +1 from me too!

  5. Mad Flavius says:

    I add a fifth, probably unnecessary voice to the clamor of BSP writification.

  6. rofltehcat says:

    I myself am not very interested in mapping as I haven’t really modded/mapped myself. But I understand it… it is a bit like using MS paint instead of photoshop.
    But optimisation interests me. I sometimes wonder why some games that don’t look that great run so badly on my system (warhammer online… grrr…) while many others look fantastic on it and give me very good FPS.

  7. LemmingLord says:

    If you think making a HL2 level is difficult, try making a TF2 map. Just making a spawn room took up about an hour of my time. Hammer needs to die, right quick. At least you don’t have to manually point it to where all the tools and game files are, like you used to. That got annoying when it refused to save so I had to spend a good ten minutes at start up every time, re-entering cryptic filepaths.

    +1 for BSP lighting!

  8. betty says:

    One more for the BSP write-up. Extra helping of snark and humour, please. (The line about restarting your chisel made me chuckle.)

  9. RichVR says:

    It’s Daikatana. Sorry.

  10. SHODAN says:

    Oh yes, we do want to know about the change in BSP tech! Will be interesting to know how a clearly defined partitioning scheme have changed and yet somehow refused to have it’s name changed.


  11. Rosseloh says:

    The compile times are what always drive me away. I’ve learned that, if you want to test it just to see how the movement works (props in the way, etc), then you can uncheck the radiosity simulator and whatever the other one was and it will only load the geometry… But woe betide if you want to check lighting levels. And the time is NORMAL, they say. I can understand a two-hour compile time on a map when it’s the final build, but when you just want to check the placement of a dynamic light…..they need to do some optimization.

  12. Jazmeister says:

    I just wrote a map-making how-to for PC Gamer UK, and I noticed there was an option (in the L4D version at least) to set your render window to deal with full lighting. Of course, the shitty Future Publishing computers couldn’t handle it, which is pretty funny really.

  13. Julian says:

    There are two games which really caught my fancy with their level editors: one was Far Cry 2, which I assume is similar to Crysis’. You have a square terrain, then you work on the topography (hills and rivers and such), then add buildings, weapons, people, all of which can rotated, twisted and turned to your liking.

    The other one was Max Payne’s, which allowed tons of wacky textures, and you could shift between the Wireframe + textures mode, in which light was represented with spherical translucent balls, and the mode in which you free-fly around the level, and see what it actually looks like in-game.

  14. Matthew says:

    On a side note, Quake (the original) mappers regularly create maps that takes days, weeks, even months to VIS (part of the BSP baking) now…

  15. Lazlo says:

    Your analogy to a sculptor makes me wonder: How long would it take one of the sculptors of Mt. Rushmore to back away to a point where they could really “see” what they were sculpting?

    The only editor I’ve ever used for a game was for NWN, which I thought was pretty cool (though I could see how tough it would be to develop in it for a large project). Looking at your descriptions, I see that it’s the same level of crappy that Valve’s using, which makes me kinda want to play around with something that’s actually good…

  16. eri says:


    Far Cry 2’s editor is a mapping tool and doesn’t offer the same level of control that Sandbox 2 provides, but it’s basically quite similar. I’m not sure about Far Cry 2, but Crysis’ editor uses heightmaps for terrain, which can be imported from any other program that does heightmaps. Objects, like buildings, vehicles, etc. get placed on top. The vegetation system is also fully customisable and pretty easy to use. Unlike Far Cry 2, Sandbox has a voxel-based system that allows you to precisely carve out terrain, similar in practice to GSC subtracting, but far faster. The major difference between Far Cry 2 and Sandbox 2 is that with Sandbox 2, you have total control over everything: every texture can be changed as you see fit, you can have as many objects in a level, you can use any assets in the game (or your own if you want to set them up), you can do very complex scripting/mission objectives/AI setup, etc. It’s extremely friendly for a designer because it gives you the ability to edit things quickly and easily without sacrificing control over what you do.

    I’m almost curious to fire up Hammer. I’ve had experience with Sandbox 2, Far Cry 2’s editor, all the Blizzard stuff, The Witcher’s Djinn editor, some UnrealEd, and a little bit of Infinity Ward’s editor (which is probably about as bad as Valve’s). but Hammer sounds like it’d almost be worth learning just for a bullet point on my resume.

  17. Mr. Wizard says:

    Hey Shamus, have you seen the Verse tools? They are neat, even if it looks more like a game that an editing tool.
    The link is from the programmers homepage. I couldn’t find the video posted on Youtube.

  18. bbot says:

    My computer’s brutally fast, so compilation isn’t a problem (for me) but what annoys me is that there’s no message passing (hammer just invokes the game with -map path_to_map) so every compile you have to close the game and open it again!

  19. Nyaz says:

    That analogy with the stonecutter alone seems to be a reason why the episodes are coming out so slowly for Half-Life 2 :P

  20. WILL says:

    Oh, so that’s why Episode 1, a two hour long game, took two years to make!

  21. PDClone says:

    Amazingly interesting article, please post more stuff like this.

  22. Carra says:

    I don’t even know what BSP is.

    The alternative to putting an engineer on it for a year is quite easy. License the Crysis or Unreal engine.

    • Shamus says:

      Carra: Actually, once you’re an established company, licensing another tech is more painful than writing your own tools. Every artist working for you has to re-learn their job. Then all art assets would need to be thrown away and rebuilt, or at least re-worked for the new system. Plus, you’re at the mercy of that someone else’s tools can do. I’ll bet the Unreal and Crysis tools don’t have anything like Valve’s tools for facial manipulation.

  23. W says:

    New guy here. +1 for BSP writeup.

  24. SatansBestBuddy says:

    Huh, I’ve never really thought about that before.

    It’s good they were able to make a game engine that could really stand the test of time (HL2 is one of the few games that looks great and will keep looking great for a number of years more), but when it comes at the cost of keeping the same tools in order to keep making games in the same engine, which get outdated painfully quickly in game industry time, then maybe the payoff isn’t nearly as worthwhile as it would seem like.

    Actually, since graphics have hit something of a plateau since Crysis, a 2005 game so good looking that you’d need a 2010 machine to run it at 30fps, then maybe 2006 would have been a good year to start working on the next iteration of their tools so they can keep using them for a decade or two, even after somebody else comes up with a game that looks better than anything else on the market.

  25. Ralph says:

    bbot: It’s been a while since I used Hammer, but I recall telling it to compile but not open the game, then keep the game open and reload the map at the console.

    Shamus: I don’t Hammer has never really been totally rewritten since it was called Worldcraft and was used to make Quake maps. The map file format used is still similar, and up until entity in/outputs in the source engine, entities were handled the same (you can still manually link up a button & door with target/targetname the old way if you wish).

    I think after using it for a while you get used to making several changes per cycle, and get better at predicting what needs to be done to fix something.

  26. Kage says:

    At this point, since they’ve already been working on HL2E3 for a couple years (presumably), I’d rather they just finish it off and release it before they try killing Hammer … otherwise, I’d be worried that E3 will be delayed even longer than it would have been otherwise.

  27. eri says:

    @Shamus: Sandbox 2 has a facial editor that works just fine. It’s not as detailed as Valve’s but it works well enough – use phonemes to blend various facial “states” together according to an audio file, coupled with extra expression states for the rest of the face (i.e. “cat” would be animated using the K, Aa, and T states). In the practice of a modern shooter, it works fine, so long as you aren’t ridiculously close-up to the character; any major errors are the designer’s fault.

  28. Jabor says:

    I’d be interested in seeing your writeup on how BSP has changed, too.

  29. bbot says:


    That’s cheating!

    Excuse two: It should do what I want it to do, instead of what I tell it to do.

  30. Eadwacer says:

    It’s called the experience trap. The more experience you have with X, the better you are at it, and the more it costs you to become a n00b again because you switched to Y. Meanwhile, those who you trashed because they were learning Y early are now ahead of you in experience. Happens a lot in fast moving technology. Most folks with technology X press hard to improve it, rather than switch — think about dot matrix printers — but that only lasts so long. That’s one reason they say that a new science idea doesn’t become big until all the old scientists have died off.

  31. Ian says:

    Oh ho ho, if only Valve were using tools from 1999.

    Hammer, formerly known as Worldcraft, got its start as a Quake level editing tool…in the mid-90s. I don’t remember exactly when it came out, but I do remember it being the first Quake map editor that I used, in around 1996-1997.

    It certainly makes sense for Valve to purchase an already completed and well-supported development tool for their game, especially given that it was also based on the Quake engine, but it seems odd how little the editor itself has progressed after several engines and all of these years.

    Worldcraft was fine for Quake, but even the level of detail and interactivity in the original Half-Life really pushes Worldcraft’s simplistic interface to its limits.

    And the less said about the build process, the better. Ugh. I have many painful memories about building, lighting, and VISing Quake maps on my old 486. The fact that people still put up with that during test builds nowadays makes me want to weep.

  32. flip says:

    Keep in mind BSP in Hammer is a layout tool, not a free form modelling tool. Valve’s trademark is well crafted FPS experiences. That takes lots of design iteration on the layout of the space and player testing probably using flat shaded simple surfaces before the level is “dressed up” for final presentation. You could say Hammer enforces a focus on gameplay. Having worked on 2 projects where 3DSMax or Maya was the main content generation tool, I can tell you there was no time for iteration. I know several level designers at Valve that worked on many different content pipelines while in the game industry and they will tell you Hammer is superior way to work.

    Second, Unreal also contains their version of BSP, and it does take some time to compile. Not everyone uses the Unreal BSP features, but it is a useful tool for layout. Unreal is not strictly WYSIWYG, it just has a more robust real-time lighting engine within the editor. I don’t know of any Unreal game that shipped with out using some pre-computed lighting features. This means the final levels looks a lot different (worse) than full dynamic lighting you see in the editor.

  33. Rick C says:

    but if people actually want to read about how BSP tech has changed over the last decade I’ll take a stab at explaining it.

    I’d like to see this.

  34. Sam C. says:

    I’ve worked in Hammer, UnrealEd and the Far Cry 2 editor, and I’d have to say I like the Far Cry 2 editor the most by far. It’s a bit streamlined and doesn’t have some of the advanced features of the others, and the version they’ve released can only create multiplayer levels, but the workflow is so much better. Just drag and drop in models, mold the terrain, and it just takes a few clicks to create believable outdoor environments. You can enter the level at any point with Ctrl-g like in the Sandbox editors for the first Far Cry and Crysis and test it. It’s really good at what it’s built for – convincing outdoor environments. Hammer has its roots in corridor shooters, and it shows.

  35. MacD says:

    The first editor I used which had me thinking: “wow! Now this is user friendly!” was Oblivion’s. Morrowind’s might be the same, but I never used that.
    Oblivion’s was the first REAL wysiwyg editor I’d used, one where you just got on with building the environment and adding props without having to deal with zoning, lighting, restricted tilesets (NWN, I’m looking at you and your insane way of dealing with new tilesets and lack of SDK until year(s) later!) and other technical stuff which was only relevant to optimisation (important, to be sure, but not when starting to build your world). Only thing it misses is a propper/real allign tool (but the use of the ‘f’ key was very handy!). And the fact that you still did have to fire up and test ingame instead of the editor being in the game.

    As for the verse tools: wow, what shit! Real bad workflow wise, although they look kinda nifty… for the first five minutes, after which that look just gets in the way of getting things done. Creating poly’s, dividing edges, alligning stuff … all the routine, everyday stuff a modeler does the Verse tools did in a bass-ackward way. But then again, the verse tools were made with procedural content in mind, not hand modeled stuff, so it never really needed to be artist friendly.

    As for the BSP article gestating in you brain: here’s another +1 for that! I know a bit about BSP itself, but never knew it had developed that much since Carmack started using it. I’d click the “click if you want to know more!” button!

  36. HeroOfHyla says:

    And now they’re still using it for Portal 2. Normally my PC can handle whatever I throw at it, but it’s been about 9 minutes of “PortalFlow” processing in the map compiler on one of the included maps and I’m getting nowhere fast.

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *


Thanks for joining the discussion. Be nice, don't post angry, and enjoy yourself. This is supposed to be fun.

You can enclose spoilers in <strike> tags like so:
<strike>Darth Vader is Luke's father!</strike>

You can make things italics like this:
Can you imagine having Darth Vader as your <i>father</i>?

You can make things bold like this:
I'm <b>very</b> glad Darth Vader isn't my father.

You can make links like this:
I'm reading about <a href="http://en.wikipedia.org/wiki/Darth_Vader">Darth Vader</a> on Wikipedia!

You can quote someone like this:
Darth Vader said <blockquote>Luke, I am your father.</blockquote>