User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
0%
...it's awesome.
60%
...it's okay, I expected better.
20%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
20%
Total votes: 5

Who's online

There are currently 0 users and 50 guests online.

Welcome to RUST | Gamedesign.net

Getting Started

Submitted by Andy on Sat, 2004-10-16 21:01.

Hammer 3.4

Getting Started - by Andy

Getting Started with Hammer

It's important to get used to referring to the Help Section in Hammer 3.4 as that's where the Setup Guide is located.

When you first load Hammer, it'll ask you if you want to view the help files. Use these to assist you in the initial Setup of Hammer.
Once you have Hammer set up, go to the File menu and click New.

If you left the defaults in for the options General, 2D Views and 3D Views during setup then you should be presented with 4 windows:
Camera View, Top (x/y), Front (y/z) and Side (x/z). I prefer having the scroll bars option checked in 2D Views.

Fig 1
Click to enlarge

You should have something that looks like the screen shot above, without the blue green and red lines in it. I have drawn back in camera mode to show you the centre of the map. The lines intersect at the centre, also shown in the other windows by the darker green lines.

The editing screen:
The 2D Views on your screen have white Grid Lines on them. The outer edges of the grid represent the largest possible map size that the engine can handle (actually you need to stay within about 128 units of the edge). So when you get around to creating your first brush, try to start on the centre. The centre is designated by a crossed set of dark green lines.

The most common problem for new mappers is that their imagination is bigger than what the engine can handle.
To get an understanding of what a map is all about, think of it as a shoebox. Everything inside the box is the map, or what the engine will render, everything outside the box (including the outer faces of the box) is the Void. No mans land, space, nothingness. This means that the engine will not render it.
The biggest single problem for new mappers occurs when they build a box. The brushes must mate or touch each other creating an area inside the box that is "airtight" to the outside Void.

Care taken during the initial brushwork saves the trouble later of re-doing the whole thing. If there is a hole in your box, there will be a problem when you run it. An error will occur called a LEAK. And that is just what it is! a LEAK.
The engine can see from the inside of the box to the outside of the box, and this can lead to other important compiling programs not being run. Apart form bad building technique, the other most common problem is having Entity Types and Brushes in the Void.
When placing monsters and entities, always make sure they are inside your "airtight" shoebox.
As you get better at level design, you will find that there are exceptions to these rules... Just stick with this for the time being.

Brushes:
A Brush is just another name for a block created in the editor.
Click on the Block Tool on the left-hand side of the screen, place your cursor on the Top (x/y) window and left click on the intersection of the dark green lines. Hold and drag your cursor diagonally up and to the right about 4 squares (this assumes that you have Snap: On Grid: 64 at the bottom-right) and let go. You now have a white dotted line that is starting to represent a rectangle.
Click on the Selection Tool on the left-hand side of the screen and position the cursor over the centre of the white outlined brush in any of the 2D views. Right click and select Create Object.
You should now have a rectangle in your 2D view.

2 and 3D Navigation:
Your rectangle should be visible in the Camera View. If it isn't then place your cursor on that view and hit the Z key. That should give you a cross cursor and all you need to do now is use the W,S,A and D keys to navigate around.
To get out of Camera mode just hit the Z key again.
While I am on the subject, you can navigate around the 2D views by placing the cursor over them and using the D and C keys to change the Zoom, and the Arrow Keys to move around.
We need to do now is to make our rectangle a cube.

In the Side (x/z) 2D View, click on the little cross in the centre of your rectangle. That should highlight the rectangle.
Now click and hold the top centre little white square (handle) on the outline and drag it down or up so that you end up with a square box in that view.
You should have a square in all the 2D views.

Fig 2
Click to enlarge

Clicking on your cube in the Camera or 2D Views will highlight it. When it is highlighted the whole object should change colour. Normally it will go red to indicate that is the item you are working with.
Select Tools from the main menu bar and select Make Hollow. [Or right-click the object and select Hollow, or press Ctrl+H].
You should now have box asking what thickness you want the walls to be.
The default is 32 units. It will not let you select 1 or -1.

Here is what happens:
When you select a number greater than 1 it will automatically carve a piece out of the centre of your cube and leave you with the internal wall thickness that you choose.
If you select a negative number, it will leave a hollow the size of the original cube and build the walls externally to the thickness you have selected.
For the purpose of this we will stay with the default (32) and click Ok.

Fig 3
Click to enlarge

As you can see from the above figure you now have a hollow cube. The hollow tool works well for simple things like cubes, but be careful when using it on anything that has non-perpendicular angles (i.e. anything that's not a cube ).

To get inside your square and have a look, click on the Entity Tool, click in the middle of your square, and adjust the little green box so that it is in the middle of the space you have created in all the 2D views.
The entity you want is info_player_start so make sure this is selected in the Object Bar. Hold the cursor over the green box, right click and select Create Object [or press Enter].
You should now have a green rectangle in your cube. (If you are using the Hammer 3.5 Beta, you will see Gordon) This is the player start information that the game engine uses to work out where the player will join the map at.
Click on the Entity Tool again and as you did with the info_player_start and insert a light entity above your player start.

Fig 4
Click to enlarge

What next... Hit F9 and if you have set up the compile programs correctly (Hammer Setup) you should end up standing in a really revolting pink room.
The 'F9' key will take you to a compile screen. It is important to check the boxes next to Vis and Rad, as by default they are not checked.

Congratulations! More to follow - now that you have an ugly pink room (that isn't very big) we will explore some of the ways you can make it look good and expand on it.


Part 2: Walls and Halls

So you managed to compile the map from Part 1 and find yourself standing in an awful pink room. If you didn't, then I suggest you get aquainted with the Hammer Help file and Setup guide before you read any further.
The most commonly asked questions on the forums always have something to do with Setup or Compiling Problems.
Reopen that RMF file and let's go to work on it. First thing we need to do is change the grid size.

Snap to Grid

To do this use your [ and ] keys to adjust the setting. You should find that the cube you created fits exactly in four of the grids.

Now for a texture. Select your cube. Only got one wall? Click on the Ignore Group button. You can call up your texture application tool by pressing Shift + A or by clicking the button on the toolbar.

Texture ApplicationYou should be presented with the default aaatrigger. Select the Browse button and look for a texture you like. I have used crete3_wall01b. When you have found the texture you want just double click on it to select. It should appear just above the Replace button. Ok, playing with textures is a tutorial in it's own right, so for now just click Apply and your cube should be that texture. Now create a second room. Do this by cloning. First, select the existing room. Then, while pressing the Shift key, click and drag with the left mouse button. Place the second room 128 units away from the first room. Your top view should look like the one below. Top View

The Corridor:
Now, we need to make a hole in each room so we can connect them together. If you have read the hints and tips at various other sites you will know that carving is a mortal sin. The idea is that you should construct each brush individually. This makes sense, especially when you are dealing with more intricate work. But today we are going to carve... just remember to carve sparingly later on, and only when you are making holes in solid blocks. Carving cylinders can lead to all sorts of problems. First, create a brush that displaces the area that you want to carve. It's a good idea to make the brush big enough for the player to move through.

TIP: Have a look at the tutorial Half-life Dimensions. The minimum height of an overhead object in the standing position is 73 units and the minimum width is 33 units.

In this example I have created a brush that is 200w  64l   96h and placed it so that it is just above the floor brush and is slightly off center and just pierces each of the walls. Now, click the selected object to highlight it, and select Carve from the menu. This will cut out a hole from each wall, leaving the carving object in place. Click on the carving object again to select it and choose Make Hollow from the tools menu. You will be asked to provide a wall thickness. I have used 4 for this example because that will make the walls 4 units thick and still leave the corridor big enough to move through.

(Note: don't use negative numbers for this as the parts of the corridor extending into the rooms will intersect the rooms' walls. You could optionally resize the carving block before hollowing so that it just touches the outside of each room, then holow to -32 or something).

Top View 2Great, now we have a hollow object connecting both the rooms but if you look at the corridor in Camera view, you won't be able to see through. To correct this just click on Ignore Group and highlight the end brush of the new corridor and delete it. Do the same with the redundant wall brush and the other wall brush and end. Be really careful when you're doing this - make sure that the brush you delete is the right one. Use all the views to avoid problems. (This is where Undo Delete comes in handy). Notice how the carving has removed the wall brushes from the original cube group and created several other brushes. This is one of the reasons that carving can be problematic. A 'leak error' reported during compiling, more often than not, will be caused by moving a brush that has been affected by a carve. I make a habit of extending brushes into walls after carving, to help with inadvertent shifts of the main group. Anyway that is it. You can compile and run the map. The second room will be dark unless the light was part of the original cube group. So while pressing the Shift key select the light and drag it across to the new room. Great. Try resizing and making the corridor just big enough to move through.

Final Product

Next Part 3: Textures.

RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.