# A Walkthrough to creating a simple Level

This chapter will guide you to designing your first level.

It's very much written like a cook-book - you don't have to understand exactly what you're doing; if you follow the instructions, it'll work out ok :)
In contracst to the rest of the FAQ, this chapter is meant to be read sequentially.

Details about working with UnrealEd can be found in the next chapter.

## Assumptions

I'm assuming you know nothing about UnrealEd.
However, I'm also assuming that you're not stupid :-) - I refuse to dumb down the text until every moron understands it and everybody else is irritated at being treated like a moron...

## Planning

Remember: we have to plan the map first.
For our first map we'll build a very simple map: a storage house on a street. It will include a door, a window and have a nice-looking sky in the street outside.

By the way, if both this tutorial and the FAQ seem oddly familiar to you, it's because it is: I also wrote The Unofficial Duke Nukem 3D Editing FAQ, and a lot of the info has been re-used.

## Start me up

I'm assuming you have installed UnrealEd on your hard drive and you've had a look at the patches you'll need to get it to run. If you haven't done this, you won't be creating very many maps, I'm afraid.

So: doubleclick on the UnrealEd icon and make yourself some coffee while the program starts up. It'll take some time (told you it's a memory hog).

## Ooohhh, all these pretty buttons...

Okay. First off, you'll need all the screen space you can get, thus you should run Unrealed in full-screen modus (you can't resize the windowed version, and it uses an akward resolution).

The UnrealEd interface consists of several parts:

### The Menu

At the top, you have the usual menu. I'm assuming you know how to use a menu :)
The status bar is directly underneath it, but unfortunately, the beta version of UnrealEd (the one you're using now - the full version will be retail, and hit the shelves in a month or two) doesn't use it very much.

### The Toolbar

Aaaah...lots and lots of pretty icons to make the heart of any Windoze-user sing.
Don't worry about what they all mean right now - I'll show you which ones to use, and you can have a look at the icon reference later when you need it.

### The View Windows

Most of the screen space is given over to the four view windows.
While you can change them all to suit your tastes, currently they're set up like this:

Top Left
  The map in 2D, viewed from above.
Bottom Left
  The 3D view.
Top Right
  The map in 2D, seen from the south (XZ view).
Bottom Right
  The map in 2D, seen from the west (YZ view).

Of course, you can zoom and pan all the window contents about - I'll show you that later.

### The Browser

The browser is the texture list on the very right.
It's called Browser instead of simply Texture List because it can display Classes, Sound Effects and Music as well as just the Textures it's showing right now.

## Brushes and their uses

Remember that I mentioned that the whole architecture in UnrealEd consists of brushes.

So when we want to build our room now, we'll need to take a big cube brush and carve it out of the surroundings. The result is a neat square cave, which we'll texture to look like a room in a storage house.

## The storage room

### Creating a Brush

Right-click on the Build A Cube icon, which looks like this: .
From the now appearing menu, choose Cube Properties to define just what the cube should look like.

Now a new window called Build a Cube appears where you can set the cube properties.
We'll need a solid cube (remember, the whole empty map in front of you consists of solid granite, and we're just carving a bit out of it), so keep the radiobutton at the top set to Solid.
As to the size units - well, a minimum room for our character to stand in should have a Height x Width x Breath of about 128 x 64 x 64. We're looking for a nice high storage room, so set the cube size to a height of 256 and a Width x Breadth of 512 x 512.

Ignore the option Wall Thickness (it's for hollow cubes) and Group Name. You can also, unfortunately, forget about the Help button, as the .HLP file is not included in the Beta version...

Click on Build to create a brush with the specified size, and Close to close the Build a Cube window again.

### Carving us some space

Have a look at the View Windows. See, every 2D view is showing a red square - our current brush. The 3D view shows our brush as a 3D cube, as it should.

Now, since we haven't done anything with the brush yet (we haven't carved it or added it to our map), it has no impact on our map at all. It's not even properly visible - you might think of it as a cursor.

So this is where you take the all-important step and click on the Subtract Brush from World icon, which is this one: . (The green square is supposed to be your brush, the grey one is the world).

Ta-DAH! One room created, just like that.
What has happened is that you've used your cursor brush (shown in red) to create a subtraction brush (shown in green). The 2D views haven't changed (the red brush is drawn over the newly created room, hiding it), but the 3D view shows both the red brush outline and the room, textured in a weird bubbly texture.

Look at this texture. Memorize it. Learn to hate it: it means you've forgotten to add a texture.

### Moving about

Now, we can't use this texture for our storage room, so we'll want to change it to something nice. Besides, the walls shouldn't have the same texture as the floor, right?

But first we'll learn how to move around on our map:

#### 2D movement

Moving in the 2D windows is easy: point the mouse into the window, hold the right mouse button and simply drag the map around. Do this now for all three 2D views to center the room in your window.

Now, zoom each map in until the cube fills the window comfortably: press both mouse buttons and move the mouse up and down to zoom.

Simple, isn't it?

#### 3D movement

Moving around in the 3D View is just as easy: use the left mouse button to walk forwards and backwards, the right button to look around and both buttons to pan sideways.

Thus, position yourself inside our new room.
Look at the 2D views when you do so: the little eye icon shows your current position, and the red arrow attatched to it shows your view direction. .

This is the perfect moment to explain an irritation in UnrealEd: you have to left-click into a window to update it.
Thus, when you move your view point in the 3D map, you'll have to click in all three 2D Views to see how your viewpoint icon changes position.

### Hiding the Brush

Although we've carved the brush from the surroundings, it's still there.
This allows us, for example, to move the brush and carve another room with the same size next to it.

However, at the moment the brush is an irritation, so we'll hide it:
Click in the 3D Window and press [B]. This toggles the brush display on and off, so it you ever wonder where your brush went, it might simply be hidden (I fell for that a couple of times already :)

### Selecting faces

In the 3D View, click on one of the walls: it'll be overlaid with a little blue dot pattern, meaning it's selected. Click on it again to deselect it. Click yet again to reselect it.
In technical terminology, you've just selected one of the brush faces, and now we're ready to give it a proper texture.

### Selecting a wall texture

Look at the top of the Browser. The first line says: Browse Textures.
Good, because textures are just what we're looking for now.

The second line contains a selction box saying: (All).
That's not so good, we don't want to see all textures at once. Click on the selection box to see which texture sets are loaded.

Hmmm. Currently, the texture packages Editor, Engine and UnrealI are available.
Not good enough - none of these texture packages really contains what we're looking for (btw, if you want to know which textures are all available, you might want to sneak a look at the texture reference).

Now we'll have to load a new texture package. Look for the Load button at the bottom of the browser, and click it. A selection window pops up with a list of all the texture packages available.
Load the package NaliCast (yes, these are textures from the Nali Castles).

See how the browser now shows 'NaliCastle' under the Browse line at the top?
Directly underneath is yet another selection box, where you can select what subset of the textures you wish to view. Choose Wall.

Now have a look at all these nice textures. Use the three buttons directly above the texture list to change the size of the textures. Note that at maximum display size, the size of the textures is shown next to their names.

Choose the texture named wall1_su.
If you've still got the one wall selected, it will now automatically change to the new texture. If not, select the wall and click the Apply button at the bottom of the texture list.

Now wallpaper the other three walls using the same texture.

.
Looks nice, doesn't it? Have a look at the corners: see how neatly the textures fit together? That's one of the great advantages of using rooms which fit neatly on the grid.
As a general rule, your wall lengths and room heights should all be a multiple of 2: 64, 128, 256, 512, 1024, and so on. Life is made even easier by the fact that you can enter simple formulas when choosing a brush size: instead of just entering a number like 1024, you can type 128*3+64. Very useful if you're tired or aren't used to doing this in your head.

### Texturing floor and ceiling

Now, texture the floor using nCob4 in the 'Floor' subset and do the ceiling in wrckr (from the 'Base' subset).

Look around your room. Nice, isn't it? And so easy to create.

### Save your Work!

It's important to save your work often. So this is where you'll choose Save level from the File menu.
Don't save your work into the \UNREAL\MAPS directory! That's where the original maps are, and you don't want to write around in there.
Rather, create your own directory \UNREAL\MYWORK and save your map in there. Use the name TUTORIAL.

### Let There Be Light

I bet you're eager to try your room out. Okay, but first we'll need to add some light (otherwise you won't see a thing) and a player start point (otherwise you won't be there to see anything in the first place).
Point at the 3D view, hold the [L] button and leftclick the mouse to add a light icon: .

To move the light icon in 2D mode, click on the light (it should turn green to show it's selected), hold the Shift key and drag the icon around with the left mouse button. Position the light in the middle of the room, just under the roof.

To see the effect of the light, choose the Mode menu in the 3D view and select Dynamic Lightning.
Hang on...it's already at this setting, how come we don't see the walls being lit?

That's because we have to rebuild the level first. Quake builders will groan now, but in Unreal rebuilding (compiling) a level is really fast: press [F8] to call up the Rebuilder window. Click on the Rebuild Geometry button (make sure that the Auto BSP checkbox is active).
.
Voila! The 3D view changes to display a dimly lit room. Very nice.

If you want see more clearly, you can change the 3D View mode to Textures, using the Mode menu again.

## Placing yourself into your world

Now we'll add a player start point.

### The PlayerStart class

To do this, change the browser mode from Textures to Classes, whereupon the browser changes quite a lot: the textures disappear,and are replaced by a tree view.
Each line stands for a class. By clicking on the minus in front, it can be expanded to show the subclasses.
Try it out: click on the minus sign in front of the NavigationPoint class. See? The minus turns into a plus, and all subclasses of the NavigationPoint class are displayed.
And hidden amongst them is PlayerStart.

To uniquely identify all classes, I'll refere to them like this: Class.Subclass.Subclass. For example, the PlayerStart class would correctly be called NavigationPoint.PlayerStart.
(More correctly, this should be Actor.NavigationPoint.PlayerStart, but since we rarely need anything except Actors, we'll keep it simple).

So. Click on PlayerStart to select it. Now right-click into our room in a 2D view and select Add PlayerStart here from the pop-up menu: .
Now move the player start position until it hovers just above the floor of our room. Make sure to check all three 2D windows to see if it is correctly positioned.

(As an aside, did you have a closer look at the pop-up menu just now? There are three (count 'em) options who have the A shortcut assigned to them. Don't you love Beta software?).

### Entering a New World

First off, we'll save our hard work again, this time using Save As under the filename TUTORIAL2. This way we'll have two copies of our work, just in case one gets messed up.

Press ^P to play your map. First, the Unreal Log WIndow will pop up, showing you what Unreal is doing while starting up.
As soon as Unreal has started, you're in your map! Walk around, fire your Pistol, have fun, enjoy the milestone of your first working Unreal World.

Quit Unreal (the fastest way is to type EXIT into the console) to return to the editor.

Just in case the earth didn't move for you and you can't find out what you did wrong: I am including the current map state with this tutorial. Use it to find out where you went wrong.

## Adding a box

The storage room looks a bit empty, right?

If we want to place crates into it (and we do), we have two choices: either we add a crate object (which can be shot, possibly containing something), or we build a crate out of a brush (which'll be rocksolid and indestructable).

I know: let's do both.

### The shootable crate

The Browser should still be showing the Classes. Choose the class called Decoration.WoodenBox. Don't select one of the subclasses of WoodenBox, choose the class Woodenbox itself.

Using the rightclick-menu in one of the 2D views again, add the box to the map and position it on the floor in a corner.
Now you have a box in the game, and you can try right now to start your map again and shoot it (remember to save your map first!).

But...the box is still empty. Let's put something inside: the AutoMag pistol.
Back in the 2D View, rightclick on the box and select the very first option: WoodenBox Properties (1 selected), which will pop up a window called WoodenBox Properties.

See how many properties such a simple object has? But right now we're only interested in a single one: click on Decoration to open the properties which are shared by all decorations.
We want to fill in the contents field, so select the class Inventory.Weapons.AutoMag in the browser and then click on the contents field in the WoodenBox Properties window. Select the Use button and you'll see the text Class'UnrealI.AutoMag' appearing in the contents.

Note: you could just have typed Class'UnrealI.AutoMag' instead of selecting the AutoMag class from the Browser, but it's so much easier this way, don't you think?

Close the WoodenBox Properties window and play your map again: much better!

### The solid crate

The shootable crate is displayed as a so-called mesh. The Unreal engine does lots of fancy things when displaying meshes, most of which slow him down quite a bit. Thus the trick is using as few meshes as possible.
Therefore, if you build a DOOM-style warehouse full of crates (none of which can be shot open), you don't want to use meshes - you'll simply build a brush and texture it to look like a crate.

To be fair to the player, the new box will look different to the last one.

First change the browser back to Texture mode and load the texture package called GenLn. From it, choose the texture called mbox10 (in the Deco subset).

Next, we have to create a new brush, this time adding it to the world: right-click on the Build A Cube icon, and create a brush sized 64 x 64 x 64.
Find the red active brush both in the 2D and the 3D views (remember that you might have to press [B] to toggle active brush display) and position it on the floor, in a different corner of the room (you move the brush just like moving an object: leftclick to select it, drag it using shift-leftmouse click).
Once the brush is just where you want it, click the Add Brush To World icon: .

The newly created add brush shows up blue in the 2D views.
Have a look at it in 3D mode (you might want to toggle the active brush display off again): ugh. The textures don't fit at all.

Okay, to fix textures: select one of the textures and rightclick on it, and select the Surface Properties Menu. Aah, lots and lots of options, just the way I like it!

Choose the Scale tab, set the Simple Scale to 0.5 and click Apply.
Next, select all other faces by leftclicking on them while holding [Ctrl] and select Apply again.
When that's done, choose Close to close the Surface Properties window again.

If you want, take some time now to explore the other surface properties. Fun things like Pan, Rotate or (best of all) Effects.

Rebuild your map and play it again (need I still remind you to save your work under yet another name?).

Feel free to play about, adding more decorations (like chairs or chests), mess around with the surface properties (have you tried Mirror yet?), and come back here when you're done.

Oh, and while you're at it, you might want to switch the 3D view mode to Map Persp, to see just how much more complex the first crate (the mesh) is to the second one. See why it would slow the engine down?

## The street outside

The next thing we'll build is the street outside the storage room.
Create a brush sized 1024 x 256 x 1024 and use it to carve a street just north of our room: .
(In this example, the grid size is set to 8. Change the gridsize by rightclicking on it).

Use the 2D views to make sure that the floors of both rooms are at the same height. Also, you'll have to set the 3D view mode to Textures, as the new room doesn't contain a light yet and will thus be pitch dark.

As expected, the textures in the street look weird. Choose any textures you like to wallpaper the room with; I'm going to use NaliCast.Walls.wmbr for the walls and NaliCast.Base.block2 for the floor. Let's ignore the sky for now, it's a special case anyway and we'll look at it later.

This might be a good moment to tell you a useful shortcut when texturing things: hold [Alt] and rightclick on a texture to remember it, point at another wall, hold [Alt] again and leftclick on it to change the texture to the remembered one.
Try it: it's really convenient.

Place two lights at the roof of the new room, right-clicking on them to change their LightColor.LightBrightness property to something lighter, like 120.

## The Window

Let's make a window, connecting the storage room to the street.

Create a brush sized 64 x 32 x 64 (assuming that the street is 32 units north from the storage room) and use it to carve (ie create a subtraction brush) between the street and the room: .
You'll have to rebuild your level again to see the changes in the 3D View.

As easy as that. Play your level again and look out the window at the street.
Glass is a bit more complicated, and is covered in The HowTo Section.

You'll notice that the wall texture containing the window doesn't look very good anymore, because it wasn't meant to have a window cut into it. You should change it, perhaps to the same texture you used on the other side of the wall, in the street.

## The Door

Doors are a bit more complicated than windows, because they consist of two parts: the doorway (the hole in the wall) and the moving door itself.

### The Doorway

The doorway is created in exactly the same way as the door, except that it's larger to allow the player to pass through it. Doorways should have a minimum size of 64, although 128 is better (the SkaarjTrooper player model won't fit through 64-sized doors).
Let's play it safe and cut a doorway sized 128 x 32 x 128 into the wall.

So far we haven't bothered with the texture on the sides of the window or the doorway, but let's take a moment to fix at least the floor texture of the doorway.
Make the texture the same as the floor texture in the storage room, select both floors, rightclick and choose Align as Floor/Ceiling from the Align Selected menu. This makes sure that the texture flows evenly into the door - unaligned textures look terrible.

When you rebuild now (remember, you'll have to rebuild after most changes and definitively before playing the map), you'll see the light from the street spilling into the room.
Such a vast improvement over the DOOM/Duke Engines, where you had to do this by hand...

### The Moving Door

To create a door which automatically swings open as the player approaches it, we'll have to create a so-called mover. A mover is a brush that moves through the map according to previously defined keypoints.

First, create the door. Make it a bit thinner than the doorway but otherwise the same size (would be drafty otherwise). Place it in midair in the street and texture it any way you like. (Hint: look at the NaliCast.Door textures).
Make sure that you texture all sides of the door, and if your texture uses hinges, make sure they're all on the right side.

In 2D mode, select the door (you might want to move the red brush away to make sure you're actually selecting the right brush). Richtclick on it and choose Copy Polygons/To brush.
Now the active (red) brush contains our door (although the original is still floating in mid-air).

Move the active brush into the doorway and click the Add Movable Brush icon:
Hide the active brush and take a look at what you've created: it looks like a normal brush, but it only shows up as an outline in the 3D view.

Rightclick on it.
The most interesting bit in this menu is the Mover Keyframe option; it's where you define the keyframes of the moving brush. In the game, the brush will move from keyframe to keyframe (rotating if necessary) when triggered.

Choose Key 1 from the keyframe list.
Now you can drag the door to the 'open' position. You can either simply let it slide into the wall or use [Ctrl] and Rightdrag to rotate it to any position (in the 2D views).

Once you're happy with the final door position, select the door brush again and switch it back to the Key 0 keyframe (the start position).

Rebuild the map and play it.

Once you're sure the door works okay, you can delete the original brush still floating about in mid-air.
By the way, rotating doors have a little problem: if they open towards you, the bump into you and immediately close again. Thus they should be triggered by a button or something - it's safer to build 'normal' doors as sliding into walls.

The door isn't perfect: it doesn't make a noise, it might open too fast or too slow. You can fiddle with the doors properties (have a look at Mover.MoveTime, for example), or you can look up doors in The HowTo Section.

This is just a demo map, so we'll continue to the final part: the sky.

## The SkyBox

Something is still missing in our map: the sky in the street isn't a sky yet.
In other games (like QUAKE), you'ld simply give the sky a moving texture and that's that - but Unreal has a much more powerful way of doing things: the SkyBox.

The exact details can be looked up in The HowTo Section, I'll just show you a quick way for now.

First, you create the SkyBox itself: this is simply room somewhere, which defines what the sky will look like. Carve a 128 x 512 x 512 room somewhere on your map. Of course, it shouldn't be connected to any of your rooms.

Load the SkyBox texture package and texture the floor with grnd, the walls and ceiling with NCld.
The ceiling needs two effects set: U-Pan (for moving clouds) and Unlit (so the clouds are fully visible).

Finally, place an object on the floor in the middle of the SkyBox: Info.ZoneInfo.SkyZoneInfo.

To apply the SkyBox, move back to the street and give the sky texture the Fake Backdrop Effect. Rebuild the map and try it out.

## Done!

All right! Looks like your first level is all done!

Okay, so it isn't perfect. But it does show you how to do the most important bits, and should provide a solid base for creating 'real' maps.

Have fun, and Best Of Luck!

(Oh, you want to add monsters? Here's a tip: have a look at Pawn.ScriptedPawn...)

Return to the Table of Contents