Tutorial - My First Ever HL2DM Map

Foreword

My First Ever HL2DM Map is going to be a KILLBOX

This may strike some of you as a strange choice of map to give a tut for…however, this is IMHO the best way to start mapping. Reason being it (usually) has no complex architecture, no fancy effects (again, usually). A “traditional” Killbox is just a big room with some catwalks, lifts / jump-pads, weapons and lights. Sufficient to provide one with a solid preliminary understanding of what mapping (and Mapping in Source at that) is all about.
Moreover, some of you who have already been to other well established mapping forums / sites will argue the necessity for this following tut as indeed all this information and much more has been already covered elsewhere and perhaps by more able and knowledgeable level designers than I. All true, however, I still feel a few subjects were never covered in a way that will cater for the absolute beginner. Hence a “My first ever map” tutorial, hence a few other tutorials I’m working on that will attempt to cover the more intricate facets of Source mapping in layman’s terms and have them all in one place.
There are other, great mappers on this forum that can also lend a hand and help young’uns make better DM maps as the amount of bad maps is overwhelming . so please feel free not only adding your own tutorials and articles but also critics to this tut are most welcome.


Notes

• This tut assumes you have already configured Hammer for work. If not, go here to manually configure Hammer http://developer.valvesoftware.com/wiki/Hammer_Manual_Configuration
• This tut will refer to the Mouse’ left-click as mouse 1 and to the Mouse’ right-click as mouse 2

\

The Void


Source works in a way where its “Universe” is surrounded by Void. Once you’ve had a few good hours of mapping behind you this starts making sense and as time goes by…much more than that even; The terms Void and Leaks will follow your every step in the world of Source level design. While some other engines (like the Unreal engine for example) work exactly the opposite (the Universe is “carved” out of an infinite “chunk” of “matter”) Source spoils us with the endless choir or watching out for Leaks as we constantly need to keep it all sealed off from the outside. Lovely.

Leak: a term simply referring to a HOLE in your map. Source while calculating BSP will find the hole and the first entity it comes across and will let you know that entity name bla bla has “Leaked”. There is usually a way to find where you leak is and that is by:

  1. Let Hammer finish compiling the map at least once.
  2. Go to Map > Load Point File
  3. Now you will see a red line showing you exactly where your leak is.

In Hammer the Void is the Black area (also in game, go into Spectate-Mode and move out of the map; you will find yourself in the blackness of the Void).
For a map to function properly in game it has to be completely SEALED off from the outside Void. All sorts of mishaps can and will inflict your map if it has a leak. Some leaks will prevent your map from compiling. Some will let you compile but crash your map in game. Some won’t even crash and people will be able to play them. The Source engine is a very strange thing. :open_mouth:


Let’s get to work



Hit Ctrl+N to create a New project.

Under Map from the (top) options bar make sure the Snap To Grid and the Show Grid options are checked. Now we’re good to go.

Since we are about to become world class mappers we want to embrace good mapping habits from early on, we will therefore hit Shift+A (face Edit Sheet, we’ll get acquainted with this little baby later on) hit the Browse, and in the filter bar we will type tools. Double click on the NODRAW texture (yellow with the word ‘nodraw’ written all over it…quite the no brainer).

In Hammer, to lower and raise the size of the grid use the [ and ] keys. Set the grid size to 64.

We will be creating a box now.
Go to the Block Creation Tool and in the Top 2D view create a 2048 x 2048 square. In the side 2D view see that your block is 64 units high.
If this is what you see in front of you (image #1) then go right ahead and hit Enter. This will create the first block. Congratulations - you are a Mapper now. Beginner – yes. But still a Mapper nonetheless and don’t let nobody tell you otherwise. They’re just jealous.

now, to see what you’re doing in 3D: look on your left at the tools bar (vertical in Hammer). you’re looking for a red camera. choose it and by dragging your mouse 1 and letting go of it you will be creating a LOS (line of sight) for your 3D camera. once you’ve done that your project will always load up showing up the 3D view. (to change the LOS of your camera at all time simply click on the camera tool and hit delete :slight_smile: then create your new LOS).

Now, in the Side 2D view we see a 64 units block…let’s clone that shall we.
Click on the Selection Tool (see image #2)

While holding down mouse 1, press Shift and drag our block a bit to the side and let go of the MOUSE FINGER to complete the cloning. Leaving the Shift finger first will simply be relocating the block.
Now, you will note that mousing over corners and sides of (highlighted) blocks shows you the “resize” options.

Mousing over a side of a block will enable you (when actually pressing it) to stretch it sideways. Mousing over a corner will enable you the same only here you will be stretching the whole block. Experiment with it a bit to get an grasp of this feature…
Done?
Ok great, now, let us locate, resize and re-shape our “cloned” block to look exactly like image #3. Let me know when you’re done. Ahhh JK :wink:.

Ok, what we’ve just created is a floor brush and a wall brush. Now, let’s clone our wall brush to sit symmetrically on the exact opposing side to the current wall. (see image #4).

Now, before we move on further we need to make sure a certain option is checked in Hammer, called “Auto-Selection” and it is located at the top option bar. Look for the option appearing in image #5 and make sure it’s pressed.

Right, now we’re stepping it up as we’re about to clone and shift two brushes together. Look in the Side 2D view and using the Selection Tool, the same way we’re highlighting files in a folder or on the desktop, by holding down mouse 1 and dragging it across the screen so it can mark the items we want, we will want to mark / highlight the two opposing wall brushes. (See image #6) and clone them (look at the top 2D view now…) as well.

Once we’ve got those two cloned we’re going to get acquainted with yet another feature of Hammer – the Transform window.
Hit Ctrl + M and you should see a little window appearing – (image #7).

At the ‘Z’ (bottom) bar you want to type in 90, they are the 90 degrees by which we want to rotate our two wall brushes. (see image #8)

Now, as you can see from the image, we have 4 wall brushes…we will want to correct the location of our newly cloned walls of course…the result should look like so – Image #9.

To complete the construction of our box, let’s go back to our side 2D view and simply clone and shift the floor brush to make a ceiling.

There, we have a completely sealed off box (image #10) all nice and ready to become an overly criticized killbox which endless n00bs will swarm and far away servers will run at 100 grav. But first…we need to give it a few features, okay?




Create a 128 x 2048 (in the top 2D view) brush that’s 64 units thick and is located exactly in the 256 height mark and 256 units away from its nearby wall –see image #11 (height mark in this article is calculated from the top of the said brush).

Clone this baby to its exact symmetrical opposing location. Image #12

Clone one of those brushes and bring up the Transform window again (remember how?) rotate this brush by 90 degrees and place it at the 1728 height mark, standing away from the wall by exactly 128 units. See image #13.

We’re not done with geometry just yet, a few more items to go …
We will now create those amazingly pointless hovering boxes no one ever uses. Two of them. Weepee!!!. Like so: create a 192 x 192 x 192 box. Place it at the 1472 height mark and 256 unit away from the wall. Looking at the side 2D view.
Now, clone it and place the cloned box at the 1344 height mark and 256 units away from the wall. Now look at the top 2D view and see to locate the boxes the way they look here. – image #14.

Now, we will create lifts. For this map we will create two lifts. A standard idea with killbox lifts is that they connect to more than one place so, looking at the top 2D view, notice how for example in image #15 the two catwalk brushes form a sort of cross and the lift is nicely sitting and flushing both. We want to create our first lift the same way we see it in the image. For this tut we will create the lift a 192 x 192 and 2 units high. Do the same for the opposing diagonal corner for the second lift.




Entities

The Source engine features a LOT of entities, while we will cover at least some of the most important / relevant ones for DM in further articles / tutorials, this great part of Source mapping will be represented in this tut by only 3 types of entities: Func_door – from which we will create our lifts, Trigger_push – from which we will create our jump-pads and func_detail – which we will start off with.
Func_detail is a brush based entity which has no function or purpose other than not being calculated in vvis, …which we will discuss elsewhere also (yeah I know, but trust me this is a story in its own right). For this tut it will suffice to say that we are turning some of our brushes into func_details for optimization reasons, just trust me on that and it will all make more sense in further tuts. In this map here we will do that to our three catwalks and floating boxes.
To turn a brush into an entity we will simply hit Ctrl+T (just a reminder: we ALWAYS press the Ctrl key first and let go of it last. Always!). since func_detail is the default entity you get when you Ctrl+T a brush this is indeed all we need to do. We are going to do the same for each of the brushes I’ve mentioned above. Simply highlight the brush and hit Ctrl+T and there you have it. See image #16 showing the entities we will be turning into func_detail.




Now, we will turn our lift brushes into actual operational lifts. We will turn them into func_door. Let’s highlight one of our lifts and hit Ctrl+T, this time, scroll down in the list and choose Func_Door. Fill out the below.

Speed – we’re going to do a fast list that acts almost like a jump-pad being so fast so we’re going to set this value to “800” (without the apostrophe)

Lip – set this to “-1724”

Move direction (Pitch Yaw Roll) – set this to “UP” from the drop-down menu (image #17)

(leave the rest untouched)





Do the second lift and follow exactly the same steps as you did for the first lift only for this one set the Lip to “-1340”

Next, we will create our Jump-Pad: hit Shift+A > Browse > in the Filter field type “tools” and choose the Trigger texture
Now, let’s go to the Block Creation Tool and make a 128 height 64 x 64 brush that sits dead in the center of the map and on the ground. Once your brush is done tie it to entity and this time, in the menu type trigger and it will jump to the Triggers section…choose the Trigger_Push from the list and set the values as so:
Move direction (Pitch Yaw Roll) – set this to “UP”
Speed – set this to “8000”

(leave the rest untouched)

We will discuss the reasoning behind and meaning of these values in later tutorials that will cover Entities in greater scale.


There now, we done messing around with the boring stuff? Ready to move on?
We want to set the general tone of the map and give it a theme…I wanna go with something no one has ever done before, not with killbox anyway – hmmm…i know! We’ll do a Lockdown / Prison style. Yeah baby!!
Ok, so first we want to make a nice cut in the walls…so, with your Selection Tool highlight all 4 walls (using the 3D view) and then looking in the 2D view we want to choose the Clip Tool and make a nice cut at the 128 height mark. Attention! We do not want to remove anything, just make a cut.

Note: the Clip tool has a 3-click functionality: 1st click will highlight (white) only one bit and the other (highlighted red)will be removed. the 2nd click will do the same for the other bit and the 3rd click will simply cut the brush without removing anything.

Ok, for those of you who didn’t crap your map with the Clip Tool – let’s now move to the Texturing part of this tut.


Texturing


Hit Shift+A to bring up the Face Edit Sheet, which is what we will use to apply textures to our box. Mouse 1 each of the lower faces of the wall to add selections (just like in Windows) hold down Ctrl while clicking mouse 1 more faces (Image # 18).




Now let’s open the Browse menu and in the Filter field type Plaster. Browse until you reach texture name : plaster/plasterwall034c. Double click on the thumbnail to choose it and to implement it on the wall simply mouse 2 on the wall. Now, go ahead and mouse 2 on the other walls. (image #19)

When you’re done, let’s move on to the next texture. Go back to the Browse menu and browse to texture name : plaster/plasterwall034a_c17. Choose it and implement it on all the upper parts of our box walls. (see image #20).

When you’re done. Open the Browse menu again and choose texture name: plaster/plasterwall003a and texture your box’s ceiling with it. Then, go back to the browse menu and in the Filter field type: floor and choose texture name : concrete/concretefloor013a_c17 and paint the floor with it.
Let’s paint the catwalks and mid-air boxes now. look at the Face Edit Sheet window. You should be seeing the last texture you’ve just used. The concrete/concretefloor013a_c17, right? Well right above it you should see a drop-down menu titled “Current Texture”, yup? Well touch it and select the plaster/plasterwall034a_c17 texture again. And then press Shift+A again to close out of the Face Edit Sheet.
Using the Selection Tool in the 3D view we want to highlight the catwalks and the two boxes. Once they are all highlighted we want to simply hit the option you see in image #21 called :Apply Current Texture.

They will all be covered with the texture in one click. Woah. Nice right? (Image #22)

Let’s texture the lifts and move on. In the 3D view highlight both our lifts and…again, Face Edit Sheet > Browse > in the Filter field enter the word ‘metal’ and go to texture name : metal/metalgrate013b . double click to choose it and hit Apply in the Face Edit Sheet window. See image #23 for how it should look.





There. Done.
Look around you now, be honest. This has got to be the single most unique theme ever, right? Gotta be original in these things is what I always say.


Lighting


Choose the Entity Creation Tool and from the drop-down menu choose ‘light’ (you can always start typing the word you’re looking for to bring it up or at least get close to it…) once you got to the ‘light’ entity simply place it somewhere on the floor or ceiling in the 3D view, doesn’t matter. We’re going to put it exactly where we want it to be using the 2D views. First, in the top 2D view place it dead in the center of the map. Then, simply do the same in the side 2D view – dead in the center. Make sure it is indeed in the very center of the map by verifying with the front 2D view. See? Easy peasy.
In the 3D view double-click (or in one of the 2D view mouse 2 on the light entity) this will bring up the Properties window for this entity. This is all what we want it to read:

Brightness: 255 255 255 7000 - (Image #24)




Leave the rest untouched. (this is VERY simple lighting, it will light up your map in a more or less evenly manner. There is a LOT more you can do with lighting but we will not go into that just yet but rather experiment with lighting in a future tut that deals with this beautiful subject.)


Weapons and pickups


Choose the Entity Creation Tool and from the menu choose the weapon_ 357 and place it on one of the mid-air boxes like so (Image #25)

Now, choose from the menu weapon_ar2 and place one or two of them somewhere on the floor. Now, choose the weapon_crossbow and do the same. Do the same with weapon_frag, weapon_rpg, weapon_shotgun and weapon_slam (but only if you REALY REALY have to). Now, let’s put a few ammo packs. Those don’t have to be placed right next to their respected weapons but honestly… it doesn’t really matter for now: we will definitely have a tutorial that will deal with the subject of weapons and ammo placement which any mapper or advanced player will tell you – is an art all by itself. So just “go to town” with it for now. Just don’t over do it. Keep them few and far between. To place ammo packs go to your menu and start typing the word ‘item’ and the section that starts with this word will show up and you will see the different item_ammo types to choose from. Note that even though there is no need to place any weapon_smg, you may want to place some item_ammo_smg1_granade. Again… don’t over do it.
Let’s do the same with a few item_battery and item_healthkit here and there.

Done? great! Now let’s move on to place some physics props.

Physics


Choose the Entity Creation Tool and from the menu choose the Prop_physics and place one somewhere on the floor. Now double click on it in the 3D view and in the Properties window go to the World model > Browse and type the word ‘sawblade’ in the Filter field. Double-click on the model that shows up in there. Image #26 will simplify it in case you got lose.

Now, chose the Selection Tool and simply holding down Shift, drag-drop the Sawblade a few times = Clone it, just like you did with the first brush earlier. Remember? Throw a few of those across the floor and now double click on one of the sawblades to bring up its Properties window. And again, go to World model > Browse and in the filter field type “oildrum”…choose the oildrum001.mdl model. And throw a couple of those here and there.

Now, using the Entity Creation Tool we want to choose from the Menu a different kind of physics prop – the kind that explodes and respawns. We will choose the Prop_physics_respawnable and for our model we will choose the oildrum001_explosive.mdl. Now pay attention – for some reason, Source has a bug that occurs when you copy-paste prop_physics_respawnable where a barrel will explode once or twice and then won’t respawn again. To work around this bug we will need to wearily place a prop_physics_respawnable for each location we want an explosive barrel to be in. Place the entity, go into its Properties and choose the oildrum001_explosive.mdl from the model menu. (and BTW…welcome to the fascinating world of Source SDK bugs. WOOT). I usually do that by deciding where I want my explosive barrels to be…i then place my prop_physics_respawnables in these location, highlight them all and open their properties to choose their model. I hate monotony.


Spawn points and Final TouchUps


Choose the Entity Creation Tool and from the menu choose the Info_player_deathmatch. This is how we decide where players will spawn so think what you’re doing here. You don’t really want to have people spawning right in the middle of battle and get spawnkilled like sheeps. I mean, it’s cool… But not reeeeally cool. So we want to find the reeeally cool spawn point for them ok? Next to walls. On catwalks…etc. Think!
You’ll find some player_deathmatch you place are facing the wrong way or a wall…so to rotate a player_deathmatch bring up the Transform window by hitting Ctrl+M and applying the desired degree into the Z field.

Once you’re done with player spawns let’s choose the Entity Creation Tool and from the menu choose the env_cubemap entity. The env_cubemap entity is a very important element and a unique one to Source mapping which we will try and cover elsewhere. For now. just place one in the middle of the map and hit Ctrl+M and in the “move” field type 64 and hit ‘OK’. And again…there is a reason behind it which we will discuss some other time.
Now, let’s let people know where the jump-pad is by placing a decal on the floor exactly where the jump pad is. Hit Ctrl+A > Browse and in the Filter type ‘decals’…choose the texture called: decals/decalconcretedrain001a. Now Hit Shift+D to bring up the Decal tool and hit exactly right in the center of the base of our trigger_push. (see image #27)




Compile


To bring up the Compile window hit F9. Make sure to check the option saying “Don’t run the game after compiling”. (see image #28)




If you went by the above written to the letter ‘T’ you should not have any compile errors at all. If you do get any error or problems try to copy-paste your compile log into your post.

When the compile is done (about like after…erm…10 seconds) minimize Hammer and launch DM. When the game comes up, click on the “Create Server” option and choose your map from the menu (you did name your map, right?) (see image #29)





Once you’re in your map. One last thing left to do and again, it will be thoroughly discussed elsewhere. We’re going to bring up the in-game console using the ~ key on your KB and typing buildcubemaps and choosing it. You will see a few images rapidly going by and then it will stop. Simply hit ~ again to close out of the console widow. Hit “Create Server” again…choose a different map (doesn’t matter which) …close out of it and open your map again. (Why? We will discuss this in later tuts as well…for now it suffices to say the game craps up the graphics when you’re in a map > close out of it and open it back again. So the only (true) work around it is simply launching a different map > closing out of it and opening the map you were on - again. (Didn’t I mention welcome to the fascinating world of Source SDK bugs?)

That’s it. You’re done. And this is your first creation. Don’t tell your l33t friends you’re a killbox mapping devil and everything will be just fine. Your secrete is safe with me :wink:

Some ingame screens of “my_first_ever_hl2dm_map”.




let me know if you found this tutorial helpful. If you didn’t then let me know and i will do my best to better it according to inputs

this has to be the most detailed ‘my first map’ tutorial I have ever seen. Good job. I’m sure many people will find this helpful.

Ah n1 Valar, I’ll be a guinea pig for this one, although I have done something similar (my first room etc) it was a long time ago and I likely used poor technique.

Sweet, I’ve never made a map but I’ll give it a shot using this and let you know how it comes out :smiley:

nice tut Val,

Id add the vmf for ppl to download just in case they get stuck or are to lazy to read it all, they can learn visually that way. :smiley:

Pretty Awesome Valar!! I’m sure that took awhile and was allot of work. Thanks.

great job man :smiley: !

thanks guys for your words. let me know if it actually helped you create a killbox.
for those who made it to the other side - next we will be making a 50MB, LD style map with all custom materials YOU will be creating all by yourself. so lotsa fun ahead. :mrgreen:

[quote="[EYE] Valar"]
next we will be making a 50MB, LD style map with all customer materials YOU will be creating all by yoursefl. so lotsa fun ahead. :mrgreen:
[/quote]

This should be interesting :wink:

Very nice tutorial!. A few things I would do differently, but all mappers have their own style I guess. Hopefully this will spawn a few new mappers for dm, it’s really needed.

encourging ppl to host em is whats needed, theres hundreds of maps out there but i still see dm_lockdown et al on two thirds of the servers out there :confused:

[quote="[22g]Pig Popper"]

encourging ppl to host em is whats needed, theres hundreds of maps out there but i still see dm_lockdown et al on two thirds of the servers out there :confused:
[/quote]

True. What can ya do though man? If people wanna play lockdown till they’re 50 it’s their choice. I prefer custom maps.

Very nice, Valar. Thanks for all the hard work. Hammer intimidated me. Maybe i’ll try again.

Very nice work, Valar!

It takes quite awhile to put something like that together.
I’m not talking about the map!

One thing, I’ve found you can copy-paste explosive barrels anywhere PROVIDING you lift them at least 1 unit above the solid. The bug with these is that the barrel model was not compiled exactly level, you can see it if you look close enough. Lifting them up gets the bounding box out of the solid, and they will reappear.

noob kill-box contest? whoever has makes the best First killbox map gets a online sticker?

or better yet

Awesome tut valar! The time you took to make it so detailed and writing up this whole article is really appreciated.

Damn you Nino, i’m hungry now. 'want that cookie

thx lol. too many ppl avoid hammer for no reason so i really hope those who do know it can help them in. and popper’s right…we need to move on from old stock maps otherwise we’re choking the game’s evolution. a thriving community is a renewing one and we all know how organizations and groups that revolve around the same things eventually wither and die.

Whoa! Thanks man. I’ll surely try it in the near future. I’ve never made any map, so hopefully I can give you feedback on the tutorial as well.

I’m curious, what would you have done differently, and how?

doh, been going around for ages, selecting every face in the face edit sheet and clicking “apply” while i just could right click it. So i have learnt a thing, and qualifies this as a good tutorial :laughing: thx

First of all: thanks Valar, I’m now officially a Mapper :smiley: My map compiled successfully in 12 secs on the first try!

So, here’s my comments on some minor things I think could be improved on in the tutorial:
I couldn’t see the Map options “Snap to grid” and such until I created a new project.

My view had different zoom level. Took me a while to figure out you could use scroll wheel to change it.

I had to go look up how to navigate the 3D window. Initially, my view there was empty.

While holding down mouse 1, press Shift and drag our block a bit to the side and leave the MOUSE FINGER to complete the cloning. Leaving the Shift finger first will simply be relocating the block.

This confused me until I realized you by “leave” mean “take away”. I interpreted it as “leave the finger on the button”. You might want to use the word “lift” instead.

Do you have an easy way of finding, say, the 1728 height mark? I had to start Calculator and divide by 64 and count squares…

Using the Clipping Tool, you’re referring to what sounds like prior usage of this when you say “remember how?”. I can’t find it and had to go hunting for info on the net to learn that you could click the tool button repeatedly to change the way it works.

Now, when I apply the plaster/plasterwall034c, the texture is rotated 90 degrees and I can’t understand why. If I rotate it 90 degrees manually, I get two inverted parts of the texture, or both together but upside down… :frowning:

When moving the env_cubemap you’re talking along the Z axis only, right? And when applying the texture to the jump pad you accidentally typed Ctrl+A when it should be Shift+A.

Well, other than that I had no problems really. Just the right level for a beginner like me, skipping things I don’t need to know about yet!

Thanks, Cynips, for your input. Great questions! Here are the answers;

I couldn’t see the Map options “Snap to grid” and such until I created a new project.

corrected.

My view had different zoom level. Took me a while to figure out you could use scroll wheel to change it.

takes a few min of getting used to the navigation in hammer. but its not too complicated so everyone should be good after a few WTFs. :sketchy: …:sunglasses:

I had to go look up how to navigate the 3D window. Initially, my view there was empty.

i’ve now added a note on how to adjust the camera in the 3D view.

You might want to use the word “lift” instead.

i’ve changed that to “let go” which i think should click with everyone a bit better than “leave” or “lift”.

Do you have an easy way of finding, say, the 1728 height mark? I had to start Calculator and divide by 64 and count squares…

you just stretch the brush and the values are always showing on the side. no need for calculator.

Using the Clipping Tool, you’re referring to what sounds like prior usage of this when you say “remember how?”. I can’t find it and had to go hunting for info on the net to learn that you could click the tool button repeatedly to change the way it works.

corrected.

Now, when I apply the plaster/plasterwall034c, the texture is rotated 90 degrees and I can’t understand why. If I rotate it 90 degrees manually, I get two inverted parts of the texture, or both together but upside down… > :frowning: >

open the Face Edit Sheet and highlight the face you’re referring to: see that both the X and Z under “Texture Shift” are set to 0 and also check the “World” option under “align”. This should straighten your texture. Let me know otherwise.

When moving the env_cubemap you’re talking along the Z axis only, right?

yes

And when applying the texture to the jump pad you accidentally typed Ctrl+A when it should be Shift+A.

no. we first decide what texture we’re going to use and then we create the actual brush that will afterwards become the trigger push. It’s not accidental. Ctrl+A to choose the “trigger” texture and then create the brush.