Archive

Archive for October, 2009

The Steps to Sucess!

October 26, 2009 Leave a comment

So you’re installed the sdk, Booted up hammer, went through a few tutorials and are ready to make a map. but how do you go about doing it? Well for me I go though a step by step system that not only make sure I don’t mess up anywhere majorly.

AND SINCE IM BORED IM GOING TO DO IT WITH FAMILY GUY GIFS! why?

CUZ I CAN!

Step 1: Brainstorming
Thinking-grenades
“Hand me my thinking Grenades!”

Before you make even a single box you must think on what you want to make in a map.
you should have:

1)A goal; What do you want your map to accomplish? (recreation of an area? new gameplay? freak out players?)

2)A setup; How should your map flow? (attack defense? battle-lines? combat everywhere?)

3)An Innovation;What will set your map apart from the other maps already for the game?(something that you don’t see in other maps that people will remember. )

Once you have these begin thinking up a layout for the map.

Step 2:The Frame
youwishyouwerehere
“well, lets see if you can do it.”

Now its time to work in hammer, begin making your map. it’s usually best to start at a spot you really have a good idea of how you want it to look. Remember to box in everything Keep working at it until your map looks like you want it. If you have read tutorials on how to make hammer maps I shouldn’t need to tell you anything. Just let your creativity go wild.

Step 3:Check #1
31
“lets see how stupid you where…”

Now that you’ve finished the layout you need to make sure everything ok, This requires you to go into the map in-game and see if everything looks alright.

First in Hammer hit ALT+P(or map>Check for errors) this will check your map for some (but not all) errors and Report back on what it found. Once you fix everything close it and try again. if it says there’s no errors your good.

Now we check for leaks and more errors, Press F9(or File>Run Map…) to open up to run map dialog Were doing a leak test to turn VIS and RAD to No and BSP to Normal, Also make sure to check “don’t run game after compiling”. press ok and let the program do its job, Once its done go to the top The ones your concerned about are what i like to call the “double lines”

ProcessBlock_Thread: 0…1…2…3…4…5…6…7…8…9…10 (0)
ProcessBlock_Thread: 0…1…2…3…4…5…6…7…8…9…10 (0)

If you see both of these lines at the top of the page means your map ran and it found no leaks. If one of the lines is broken or not at the top. you probably got a leak. More over  if you scroll down further it probably says “****LEAKED****”  which gives you the sneaking suspicion there’s a leak. Leaks are just holes that need to be patched by moving a brush or two. Just load the pointfile(map>load pointfile) And it will place a red line that goes from one entity in your map to the outside and through the hole. close it and run the test again.

tips on leak proof maps
-Use snap to grid (Shift+W) when making the outside of the map, will keep you from accidentally moving the brush one unit too short or to far.
-use large flat surfaces(some maps wont allow you to but try as much as you can.)
-entities wont block leaks, any brush that is an entity will seal leaks. The most common case of this is overuse of the Func_detail Entity. While good to use it wont seal leaks.

Now your map is leak free were going to… RUN IT AGAIN! yep run the leak test once again(or keep the results from the last leak free test), this time you’re looking for anything that says “ERROR!” or “WARNING!” or, “YOU SCREWED UP!” Some of these may just be hammer complaining that you (or the game makers) have forgotten some small detail. If you get any errors go over to http://www.interlopers.net/errors/ Thats a Compiler error checker that should find any errors you put into it and tell you if you need to fix the error, Optimize, or just ignore.

By the way this error you can just ignore, it just means you need to compile the cubemaps in game.(something you will be doing later.)

No such variable “$hdrbasetexture” for material “<skybox texture your using>”
Can’t load skybox file <skybox texture your using> to build the default cubemap!

After this your map sealed and playable(however not very well playable) Now you need to optimize and light.

Step 4:Optimize
Untitled-123
“making sure everything is running smoothly”

Before we go on to lighting we need to first make sure the map can be run on most computers. Because unlike your super cool, super powered computer, others have crap, and you want everyone praising you for you awesome map, not just half of them saying “you suck! I cant play on this map!”

first the most common tool Func_detail, Basically turning some brushes in your map into entities so when you compile it can skip them for the leaf creation. (this is more for you than the map player as it will considerably cut down on your map compiling time.) Basically every thin, detailed and odd brush that is not big or a part of the outside wall turn into a func_detail by pressing CTRL+T when its selected.

What are leafs? Leafs is composed of the empty space in the map where the player moves  around in. They are used in-game to estimate where the player is, and what he or she can see. It then removes everything else so It doesn’t have to render it. Thus vastly improving the speed of the map. Think of leafs as trying to fill in your map with brushes. as you may guess it can become very hard to do. Especially if you have some highly detailed or odd-shaped brushes.

NOTE: stuff in the 3d skybox is automatically ignored in portal creation so don’t worry about anything in there.
Things you want to be Func_detail
-wood posts
-Stairs
-Intrique items (like door handles, do it yourself props, Tables)
-anything that is rotated(not along the XYZ coordinates)

Things you DONT want to be Func_detail
-walls
-anything touching the outside of the map
-anything that majorly blocks the player’s vision(Fences, dividers,  buildings)

If done correctly you shouldn’t have a problem with skipping the remaining optimization but it’s always good if you keep working on it. Especially if you map really catches on.

If your game is using the Orangebox version or greater  you can use hammer to see how well you optimized it by loading the portal file(map> Load Portalfile), This will create a bunch of blue boxes around your map. Each of these boxes is a leaf. The best is if they are big and simple. complicated leaf boxes makes long compile times. if you see any try to turn what is causing it into a Func_detail. If you cant, you can slice the leaf to keep the weird leafs by themselves.

How to Slice leaf
source is not human, as such it will make stupid mistakes. you do sometime need to “hint” it. on what to do.
You will need two textures for this(you should already have them) tools/toolsskip and tools/toolshint these are special textures, toolsskip or skip as its called is a texture that is totally ignored by the source engine. If a brush is covered in a Skip texture it will have no effect on the map in the source engine.  Hint on the other hand toolshint or hint blocks leafs from forming through it.

If some of your leafs are odd create a brush the same size as the odd portal(or a bit bigger) totaly covered in skip with the exception of the side facing whatever is causing the odd leafs. This side should be the hint texture, Next time you run BSP you should see the leaf go to the hint then be blocked from going further.

Generally I dont use skip-hints, but they are needed sometimes.

Areaportals
These are rarely used mostly due to them being a bit complicated. The most common use of an areaportal is at a door that goes from indoors to outdoors.

an Areaportal is basically a Nodraw brush that you can disable/enable when enabled you cant see anything on the other side, When disabled you can.

Areaportals are basically like a map in a map. an areaportaled room must be sealed from the rest of the map. (you can use multiple areaportals to do this)

even when disabled the leafs are modified to keep in the interior and exterior separated.

For more information:http://developer.valvesoftware.com/wiki/Areaportal

Step 5:Check #2
raccoon
“lets see what all that hard work has gotten you.”

Yep time to check to see what you still need to do. First its Leak check time! More importantly EVERYTHING in step 3. yeah, It’s important that if you make a mistake you fix it immediately. So go leak check and error check. However after all that its time to fully compile the map….no, actually it’s not. but one step closer, Open up the run map dialog (F9 or File>run map…) now make sure BSP and VIS are on Normal and RAD is No. you can uncheck “dont run game after compile” I dont like to or suggest to uncheck it just because if there’s a problem you have to shut down both the compiler and the game. Once its done compiling Check the log to see if anything went wrong. If so go check it on the site mentioned in the compiler error checker mentioned in step 3. If you’re all fine Its time to see what your map looks like in-game.

Start up the related source game to your map. If this is your first time doing a map check your going to want console enabled. (under options go to keyboard>advanced check “enable developer console”) The console is under the ` key (the one next to the 1 key and above the tab) Once you’ve loaded your map First thing to do (and most often forgotten by even the best mappers.) open your console immediately, many times you may have caused errors in your map. by setting the wrong setting or something similar. Copy any errors you see to a notepad for later fixing.

Interesting note: If you play tf2 open your console after loading an official map, many have models that have improper collision settings.  Most of the models are out of the game play area and have no effect on game play but the error is still logged. This doesn’t mean that there bad mappers, just lazy(or rushed).

Now Go around the map and try everything you could possibly do. (doors, objectives, holes, special spots(for a specific class or some other game specific thing), ect.) anything that looks wrong or isn’t working correctly mark it down on your notepad.If you need to move around quickly you can turn on cheats by entering “sv_cheats 1” in console and then entering “noclip” to go into noclip mode that lets you fly through walls.

a question some of you may be saying now…
Q:HEY! several models and textures are this purple and black checkerboard texture!
A:this means the cubemap failed to load. And since you never made a cubemap, its kinda obvious why. Just ignore this for now.

If it gets too annoying enter “mat_specular 0” to turn it off(this will cause your game to freeze for a minute or two as it reloads the textures w/o the cubemaps. You are likely to find you made some mistake, There’s a lot of things to get right in a map so its easy to get one or two wrong or something that just doesn’t work like you intended.  Just write them down and keep checking. Once youve had your fill of your map and you believe you found everything(you never find everything right away). go back into hammer and fix it all.  Once you got it all Its time to work on the next step.

Step 6:3d Skybox
dya_7peternaked
“Make sure you have plenty of room”

This is what im truly good at, 3d skyboxes. and with a bit of foresight and being careful. you can as well make an excellent skybox. a 3d skybox is basically a room all by itself that is cut off from the other parts of the map. The game then takes your position relative to the center of the map. and tries to fool you that the sky box is really there.

First a few notes about sky boxes that you may miss. As you may guess the key texture for this is the skybox texture, everywhere you place this texture it will try to place the fake sky box illusion. Now for a few things you should know.

-3d Skyboxes are always placed like any other skybox. It’s easy to think that a skybox is just an extension of the map but it’s really just an illusion. Anything “real” or in the main map. will be rendered in front of the sky box. so be careful when placing the sky box at corners as nothing you do in the skybox will block your view from seeing the map through the corner.

-light_environment is rendered through the skybox. This means the light checks what is in the skybox then casts light into the map accordingly. So if you have a giant pillar in the skybox It will cast a shadow into your map.

-plan where your skybox starts. You can start the 3d skybox right at the edge of the map however it probably wont look very detailed. usually what mappers will do is make a small area that’s in-game  then extend it in the skybox.

Ok, with this in mind here’s how to make the skybox.

1)create a sky_camera at the exact center of the map.(0,0,0) the point is marked with a  vertex symbol in the 3d view and the green lines in the 2d view. Make sure you get it exactly in the center. even a bit off will show.

2)create a 512x512x512 cube textured with the skip texture some where outside your map. This will help you considerably later.

3)select the sky_camera, the cube you just made, all of the outside walls of your map, and anything else that you may need to know where is when making the skybox. (note Do not select props these cant be moved into the skybox. if the prop’s model has a skybox version you can switch the prop with the skybox version but do that later…

4)duplicate it, you can do this by copying it. then pasting it in place using pate special (CTRL+SHIFT+V)

5)open up the transformation window(CTRL+M) select scale and enter 0.0625 for X Y and Z. This will shrink the blocks to the size of the skybox.

6)move the blocks to where you want the skybox to be, I usually like it in a place where it doesn’t overlap any of the map. in the 2d views.

7)apply the skip texture to all the brushes you have selected.

8)delete the duplicate sky_Camera in the game map(not the one in the skybox!)

and your done, well not done, but you have the frame of the outside edge of the map. From here you can start to map out the skybox with these brushes as reference to the map. remember the skybox is 1/16th the size of your normal map. So the scale of the textures has to be very small. 0.015625 is the 1/16th scale of the default .25 scale texture

Now if you need to move something from the skybox into the game map or vice versa that 512 block helps. whenever you need to move anything just select the block with whatever you wanted. resize it, Then align the block over its larger or smaller counterpart. This is place the item exactly where it should be in the game map or skybox.

CAUTION: Never place anything in the skybox that would be inside the map.  It can cause errors with lighting.

Step 7:Lighting
DiscoPeter
“make sure its pretty”

Lighting is one of the most important parts of a map. It’s also one of the most annoying if you have to change a large part of the map. That’s why I generally do lighting last. Lighting in itself makes the difference from an ok looking map to a great looking map. Things lighted just right can really stand out and show your skill at a map maker. There are many lights Including some quirky ones like light emitting  textures dynamic lights and sprites. But generally there are 3 lights.

Light
this is the basic light entity, It will emit light in all directions from wherever its placed. very effective for quickly lighting a dark room.

Light_spot
This is a spotlight, instead of it emitting light in all directions, It only emits it in one direction in a cone shape that is modifiable. These are good for simulating the light from overhead lamps.

light_environment
It’s the Sun! or rather Its sources sunlight simulator. each entity is like its own sun, This one can be a bit tricky at first. since it does a few strange things to better simulate sunlight.  First  the position of it doesn’t matter however the angle is what it uses to find what angle you want the sunlight to come down from. secondly the light shines through the 3d skybox first then into the map. So Everywhere you have sky box texture its like its open sky. and if you have a huge tower in the skybox it can cast a shadow in the game.

lighting in itself is an art, and you may be surprised that you can easily get into getting a light to be just right.

the main things you need to be worried about are:
1)can people see? Is it too bright or too dark? note some games you want it to be dark in some spots. while in others you want no dark shadows anywhere.

2)Directing the player. In maps a light can be helpful in giving the player a “this way” tip on where to go. make routes you want the player to take brighter, and dead ends and other bad paths darker. this is seen en mass in Left for dead that practically uses light every 3 feet to lead the survivors to safety.

3)Combat areas are lit. no one wants to fight in the dark. Make sure all areas that you believe the majority of combat to happen are bright. Corners, objectives, choke points. light them.

Dark spots Aren’t bad, but you must realize anyone can hide in them. and in many games that gives them enough of a chance to ambush everyone passing by.  Check the style of the game your mapping for. Do they have dark spots on the map? For instance have you ever seen a spot on any official Team fortress 2 map that was dark enough that you couldn’t tell what team you a person hiding there was on?

Cubemaps
cubemaps are Needed for anything shiny, they are basically used a point reference for a full 360 picture of the area that is stitched together and placed into the texture to make it look shiny.  for alpha you only need a few(even one will be fine), However once you are nearing completion you will need cube maps everywhere. Just dont go overboard, depending on the setting’s cube maps can take up a lot of space on the final size of your map.

for more info on lighting techniques see the guide on the SDK wiki

Step 8:Check #3
Evil-Monkey
“NO MORE CHECKS!!!!!!!”

Yes, once again we come to another check. At least this time its the final one. well final one for this tutorial. Now that you have lighting and a skybox on your map At least at this point you can take a few liberties. First if you haven’t touched any of the outside brushes since the last check you can just skip the leak check. Although doing it for good measure doesn’t hurt. Still check for errors using ALT+P. Now We are finally going to run the map fully. so Run the map. (F9) and check normal for all 3 and let it go(I still don’t suggest auto-starting the game). Depending on how many lights you placed and how well you optimized It can take anywhere from 2 minutes to 15 minutes. Any longer and you likely either crashed or your map is not optimized enough and You need to go back to step 4. If everything went through check the log for any errors or warnings.

ah but what if it doesn’t work? I know of several things that can cause the compiler to bug up and crash.

1)If you ever see a window error failure to copy file, this means the map was compiled however when it came to copy it to the map folder the Compiler couldn’t find it. Most of the time it means nothing and the program just had a sudden case of explosive amnesia. If it happens more than once however you may have the location of your game folder wrong in the preferences.

2)Vrad Crashed! It happens, keep in mind its a Ray-tracing lighting program. Ray-tracing is a very efficient and realistic way to light a 3d area. However It takes a long time to do. So hammer Pre-renders the light. and thats what Vrad does. This does take a lot of work so It’s not surprising that it will sometimes crash. If it does Just run the compiler again.

after finishing the compiler start your map up in the appropriate game and start the look over, just walk around the map checking the lighting and the detail of the skybox. Anything looks wrong or bad, jot it down and fix it later. Make sure to go over your map carefully. Your objective is to spot any problems that the player might. Small and hard to see errors are not your main concern at this time. Dont worry if it doesn’t look 100% perfect, your still in the alpha stages of your map and its likely your going to be adding a lot more.

“there’s Purple and black squares on everything shiny!!” Don’t worry, in some games (like tf2) Hammer wont compile the default cubemap. Therefore when source goes looking for the cubemap it cant find it and instead uses the “missing texture” texture if purple and black squares. Building the cubemaps fixes this.

To build cubemaps Enter:
sv_cheats 1
mat_specular 0
buildcubemaps

that’s it, you will have to restart the map and re-enable mat_specular before it show the cubemaps. you will have to build the cubemaps before releasing the map, but until then you can just either turn off mat_specular or enjoy all that purple and black.

Step 9:Finishing
FamilyGuy_Ridiculous
“Time to party….Or is it?”

Ok you’ve got your skybox, your leak free, you’ve got your lights in order, and the map has passed all the checks, time to release it onto the world….actually no.  Before that you need to take one last look over your map. make sure you havent missed a thing, Try out every objective, look at every area. Make sure everything works.

Now that you’ve finished the map its time to start packaging it. There are many features source has to make your map install better and look more professional

First if you havent compiled the cubemaps

secondly,do you have any custom content? have you added any textures, models, sounds, etc, that you’ve made yourself? If so your going to need to pack them into your map.

go Here! It’s a program that will allow you to insert custom content directly into your map file, therefore anyone who installs your map will just have to copy one file.

If you are running tf2 or similar source games with thumbnails. you would want to have a thumbnail for your map. theres a good tutorial of how to do this here!

finally rar it, this will make it easier to move to a site, (also many sites require it)

Now you can upload your map to the map sites.

After release try to play your map whenever it pops up on a populated server,  occasionally introduce yourself as the map creator and ask for options of the map. Other times just play and see how well people play on your map. Make notes of anything you see wrong, (players being confused, going the wrong way, Missing key objectives..) use this to rework your map so its easier to play. then re-release the map as the next version. dont release maps every week however, chances are people will get update overload and it will kill your map altogether. Instead release updates every few months. This should give you sufficient time to get many issues in the map fixed. Also try to keep a list of what you changed and include it with every update. Keep in mind that although you may know more about mapping and how hammer works, even the strangest idea can turn into a great one if you put some thought into it.

As you may have guessed your still not done, making a map from start to final version takes months, to years and lots of dedication. Most many maps are dropped after a few revisions. Now this doesnt mean the map makers are lazy, It’s rather They dont see their idea for the map working correctly. I myself Will trash about 1/5 of my maps before they even get off the hammer page. It’s just a matter of a map not working like it should. Many times If I find I cant figure how to proceed with a map Ill shelf it for a month or two then come back to it after working on another map.  Currently I have about 4 Primary map projects Im working on with another 5 that are on cold storage. What will likely happen is that I’ll get stumped with one and move over to another map, work some in that, then go back. as long as you keep making progress you’ll keep putting out maps.

Map versions:
You should keep your map in Alpha stage until your 100% sure the layout will not change drastically. (no adding large extra rooms and such) save your first file with _A_1 at the end of it. That signifies alpha 1 or first version of the map. whenever you change a large part of the map or release a map you must go up one number. For small changes you can just add another number on it. such as _A_1_1 or Alpha 1.1 keep this up until you are sure your map has the layout you want. now your in beta. name your first beta version _B_1 or Beta 1 This means the layout is done but may still need balancing. and that is what you should focus on now, keep thinking about how to better your map. Once you believe your map is perfect, Its time for Released content 1 or _RC1. Why do we not just name is Final or no version after it? Because you are not finished! yes you have passed alpha and beta but your still going to see problems, and people will still beyond all means find exploits and holes in your map. naming it this gives you room that if you need to you can still release another version.

Map making is one of the hardest things you can do in the multimedia field, a cameraman just has to make sure one view looks good. You have to make sure the entire world looks good and that none of the little rug-rats who play your map break it. Always Assume some player is gong to test out all your clip fields, all the physics props, climb on over surface, press every button, and do whatever else you put into the map just to see if they can break it for their own use.

When map making always remember
-Keep it simple stupid.(or kiss method)
-Don’t take the easy way.
-Expect exploiters.

And always Think sideways ^_^

Advertisements
Categories: Hammer, How-To
%d bloggers like this: