News:

We have a new forums theme. This theme is mobile responsive and SEO compliant. The last one was not.
|CoR| Staff



|CoR| SpiritVII

Level Design 101: Getting Started
« on: February 28, 2009, 11:43:14 PM »
Level Design 101: Getting Started Day of Defeat Edition
*Last Updated* 01-16-2010

This is part of a course designed to teach you how to create levels from the ground up.
In this lesson I will be teaching you the fundamentals of level creation and how to set up the software needed to create levels.
By the end of this lesson you should be able to create a basic level and walk around in it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Table of Contents


Preface

Introduction

1. Basic Requirements
 - 1.1 Mapping Terminology
 - 1.2 Components of a Map
 - 1.3 Self-Check
 - 1.4 Software & Downloads

2. Software Setup
 - 2.1 GCF/Game Content Setup
 - 2.2 Hammer Editor Setup
 - 2.3 Compile Tools Setup

3. Creating Your First Level
 - 3.1 Creating A Room
 - 3.2 Creating A Spawn
 - 3.3 Creating A Light
 - 3.4 Compiling & Testing



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Preface:

I was originally going to name this course "Mapping 101", but instead I've decided to name it "Level Design 101" because if this lesson is successful, I will release more lessons in this course that eventually discuss things more specifically related to level design. Technically this first lesson is a mapping totorial. but you need to be able to map in order to create a level. "So what's the difference?" you might ask, "Isn't mapping and level design the same thing?". Not exactly, while "mapping" falls under the category of "level design", "level design" is a much more extensive term, a "map" can be anything, a large room, a hallway, a house, whereas a "level" has a bigger picture when it comes to interaction and game dynamics. Level design is more of a goal-oriented process. By "goal-oriented", I mean whatever your level is going to be, it has goals. These level goals are usually directed toward what the player will feel or experience. Some examples of level goals are: encouraging teamwork, challenging the player with some sort of puzzle or obstacle, or practicing your aim with different weapons. Chances are... if you're thinking of making a map, you already have some sort of level goals in mind without even realizing it. Level goals in multiplayer FPS games typically include balancing teamplay, offering multiple route options, and creating areas that are timed for confrontation (I'll get into these in later lessons).


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Introduction:

Welcome to "Level Design 101". If you made it past the preface, congratulations. It's now safe to assume you're truly interested in Level Design, which is good, because it takes a great deal of interest and patience on the student's behalf. Before you can actually play your level, there's terminology you have to familiarize yourself with, geometry concepts you will need to understand, and software that needs to be setup properly.

Consider the following diagram:

While Hammer is one of the easier mapping editors around, the compiler can be intimidating to anyone with a fresh start in mapping. So what does the compiler do? I'll talk about that very soon. Let's go ahead and begin the lesson.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1. Basic Requirements
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1.1 Mapping Terminology

These are things you absolutely need to know before you can even consider mapping. Sure you can just "wing it" and figure things out on your own, but chances are you're going to learn how to map quite a bit faster by familiarizing yourself with these basic mapping principles. Not only that, but most decently written mapping tutorials out there will use these terms in their instructions.


Geometry Terms:

Vertex:
A coordinate point. "Vertices" is plural for "Vertex".


Edge:
A line that connects two vertices together (think "connect the dots"). Three or more vertices connected together by edges creates what's called a "face".


Face:
A single surface or side of a brush. In geometry, a cube has 6 sides, in mapping those sides would be known as "faces".


Brush:
A single 3D object. Examples: a cube, a sphere, a door, a single stair step.


Prefab:
A group of brushes and/or entities that make up a larger object. Examples: a house, a functioning ladder, a staircase.


Entity:
An object that contains extra information. There are 2 types of entities, Brush-Based and Point. Brush-based entities include things like moving brushes (doors, buttons, elevators..), invisible trigger brushes (hurt zones, ladders, capture zones), specially rendered brushes (window frames, water, glass, light beams). Point entities include things like lights, spawn points, models, sprites, sound effects. It's important to know the difference between them because many important things in a map consist of both, but the mapper has to create each in a different way.

World:
Any non-entity geometry in the map, a wall or floor for instance.

Leak:
A hole which leads from the inside (playable area) of a map, to the outside (unplayable area). Think of your map as a spaceship, however big or small your spaceship is, it has hold it's own air, it can't have any holes or leaks in it. If it does, some processes won't be completed and you'll end up with no lighting and most likely, lag.


File-Types:

.MAP/.RMF (Editing Map File):
The file format your editor saves/loads the map in, it's better to use .map format in my opinion.

.BSP (Binary Space Partition):
The file format your map needs to be in order to actually play it.

.FGD (Game Definition File):
Contains game-specific entity information which the map editor uses for entity placement.

.GCF (Game Cache File):
Contains most original game content. Think of it as a big briefcase that carries all your game content (maps, models, textures, sprites, sounds and other files the game uses). When you join a server or change levels, the game opens the briefcase and takes out only the content needed in order to play that level.

.WAD (Texture Library):
A .wad file contains textures that the map uses.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1.2 Components of a Map

"BSP" stands for "Binary Space Partition", which is a method for recursively subdividing a space into convex sets by hyperplanes. Okay, you probably didn't care to know all that. But in case you did, you can read the rest of it here.

All we really need to know is that a map starts out as a .rmf/.map file (which the map editor can read), and we somehow need to turn it into a .bsp file (which the game can read), this is where the compiler comes in. The compiler is comprised of 4 processes which ultimately turn the .rmf/.map file into a .bsp file, here's how it works:
[Graphic Coming Soon]

CSG:
Stands for Constructive Solid Geometry. This process chops all the faces into smaller, more basic shapes which the rest of the processes can more easily understand.

BSP:
Stands for Binary Space Partition. This process pieces the map into different sections, creating what's called a "BSP Tree".

VIS
Stands for Visibility Matrix. This process calculates all the different faces that can be seen by each other (line of sight), and creates a visibility matrix based on that information. The reason for this is so your game will only render the parts of the map that are visible to you (the player) in any given location. Otherwise it would render the entire map, causing your game to lag. An example of this kind of lag can be experienced in dod_red_baron. This process of rendering only what is in line of sight is called "occlusion".

RAD
Stands for Radiosity. This process takes each face, applies a light value to it, and creates what's called a "lightmap". This process usually takes the longest but is one of the most important because it's what gives your map lighting.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1.3 Self-Check

Before we continue, let's take some time to do an evaluation of what you've learned, ask yourself these questions...

Do ya feel lucky punk?     ...Only kidding... :icon_biggrin: Okay, here are the real questions:



1.) What is a "face"?

    A face is a single __________ or _______ of a brush.


2.) What is a "brush"?

    A single 3D __________.


3.) What does a ".GCF" file contain?

    A GCF file contains most original ______  ___________.


4.) What does the "RAD" process do?

    The "RAD" process creates what's called a ________map.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

1.4 Software & Downloads


GCF Extractor:
=================
In this course we are using GCFScape (version 1.7.5)

Download:
GCFScape


Map Editor:
=================
In this course we are using Valve Hammer Editor (versions 3.4, 3.5)

Download:
Valve Hammer Editor 3.4
Valve Hammer Editor 3.5 (Executable Only)

Note to ATi video card owners: If you're having trouble selecting faces in the 3D Perspective view, you will need to either upgrade your catalyst drivers to 8.62 or above, or visit the following thread for a fix:
http://www.corclan.com/forums/index.php?topic=24148.0


Compile Tools:
=================
In this course we are using Zoner's Half-Life Tools (Merl's 1.7 Custom Build - XP Cagey's Edition 1.5)

Download:
http://files.filefront.com/zhlt+17p15zip/;11093899;/fileinfo.html






More to come...

Everything beyond this point is being revised


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2. Software Setup
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2.1 GCF/Game Content Setup

2.2Hammer Editor Setup

2.3 Compile Tools Setup


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3. Creating Your First Level
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

3.1 Creating A Room

3.2 Creating A Spawn

3.3 Creating A Light

3.4 Compiling & Testing





Old Stuff (To be revised):


Creating Entities

First, I'll explain how to create an entity. There are two types of entities you can create, point entities, and brush entities.

* Point entities are things like lights, sounds, spawns, models, etc.

* Brush entities are things like moving doors, water, breakable windows, and ladders (just to name a few).

The reason you need to know this is because the method to creating a point entity is almost entirely different from creating a brush entity.


To create a point entity:

1. Using the "camera" viewport, navigate to the spot you want to create the entity.
(To navigate, just click the "camera tool" icon on the left-side panel, then click and drag the "camera" viewport while using the W, A, S, & D keys. Do this until you're fairly comfortable with navigating the camera.)

2. Select the "entity tool" on the left-side panel in Valve Hammer Editor

3. From the "Objects" drop-down menu on the right-side panel, select the entity you want to create (example: info_player_allies)

4. In the "camera" viewport, click once in the general area where you want your entity.

5. To situate the entity exactly where you want it, click the "selection tool" on the left-side panel, select the entity you just created, and use the "top (x/y)", "front (y/z)", & "side (x/z)" viewpoints to click and drag your entity around the map.

6. While the entity is still selected, right click it in any one of the "top (x/y)", "front (y/z)", or "side (x/z)" viewpoints and select "Properties". A window will pop up. Use the "Attributes:" box to change it's values. (note: don't be surprised if there are no attributes, some entities simply don't have any.)


To create a brush entity:

1. First you need to create a "brush". Select the "block tool" from the left-side panel in Valve Hammer Editor.

2. Using the "top (x/y)", "front (y/z)", & "side (x/z)" viewpoints, click and begin dragging to fit the generally desired size you will want for your entity. Let go when you are satisfied when you are in the ballpark of where and what size you want it. If it doesn't automatically create the brush, simply press ENTER.

3. Navigating the "camera" viewport, find the brush you just created and select it using the "selection tool".

4. Use the "top (x/y)", "front (y/z)", & "side (x/z)" viewpoints to move/resize your entity even further (ie: if you are making water, you will probably want it to reach all the way to the floor, and also snug up against surrounding walls).

5. While the brush is still selected, right click it in any one of the "top (x/y)", "front (y/z)", or "side (x/z)" viewpoints and select "Tie to Entity".

6. Use the "Class:" drop-down menu to find the entity you want to create, and edit the values accordingly using the "Attributes:" box.


--------------------------------
Explanation of DoD Related Entities:

• info_player_allies (point entity)
Description: Allies team start.


• info_player_axis (point entity)
Description: Axis team start.


• info_player_observer (point entity)
Description: Observer start, this is the first point you will see the map from (ie: message of the day, team selection, class selection).


• dod_capture_area (brush entity)
Description: Player(s) entering this zone will initiate the capturing of a control point. This is used for making two-man flag capturing, or for objectives.

Attribute:
Value(s):
Target
Specify the name of a "dod_control_point" in this field if you want to use this entity for capturing instead of the actual "dod_control_point" itself. Otherwise, leave it blank.


• dod_control_point (point entity)
Description: A control point (usually a flag, but sometimes an objective).
Attribute:
Value(s):
Name
Specify a name here for the "dod_capture_area" to trigger the control point. If you just want a simple one-man flag cap, leave this blank.

Control Point Name
This is used in conjunction with the "String to Show when capped" attribute (ie: "Player captured the bridge for the Axis team"). This field can contain spaces (ie: "allies flag").

Can Allies Touch This Point?
Select "Yes" if you want this to be a simple flag cap.
Select "No" if you want to use a "dod_capture_area" with this point.
This is also for when you want to make a one-sided progression map (ie: Axis are invading and every point they claim cannot be taken back).

Can Axis Touch This Point?
Select "Yes" if you want this to be a simple flag cap.
Select "No" if you want to use a "dod_capture_area" with this point.
This is also for when you want to make a one-sided progression map (ie: Allies are invading and every point they claim cannot be taken back).


...
I'm updating this thing, keep checking in..

To be continued:
dod_control_point_master
dod_score_ent
info_dod_detect


----------------
Recommended Tutorials:

Configuring Hammer for Day of Defeat

Video Tutorial 1 - Basic Map

note: Skip to 1:06



« Last Edit: April 24, 2010, 01:42:23 AM by |CoR| SpiritVII »

Kwanzi Claus

Re: Things you need to make DoD maps
« Reply #1 on: March 02, 2009, 12:35:30 PM »
Spirit likes mapping more than playing the actual game.

GJ Spirit!  :happy_dance:

Hammer = :comp_error: :comp_error:  :bang_head: :bang_head: :doh!: :doh!: :heart: :heart: :Oink!: :Oink!:

to many people want to snivel and cry cause someone said neg to them? or talked when they killed you? this is just a game and when you start to take it to serious and personal its time for you to turn it off and go outside. Anyways lets just ban everything on the server no more voice commands at all, no more voice chat and no more weapons lets just all run around giving each other hugs and flowers.

|CoR| Reburg99

Re: Things you need to make DoD maps
« Reply #2 on: May 03, 2009, 08:10:16 PM »
Thanks spirit, looking forward to the rest of the info
The more I learn, The less I know

OneShot

Re: New to mapping? READ THIS!
« Reply #3 on: October 24, 2009, 12:23:19 AM »
can ya let me know the name of the complier you use.. the link is dead to me and I made a map today because I got bored.. it's just a aim map and nothing more but the point was to see if certain things showed up proper ingame as they do on hammer..

thanks,
OneShot


EDIT: also if you can change my forum name to just "OneShot" that would be great :)

|CoR| SpiritVII

Re: New to mapping? READ THIS!
« Reply #4 on: October 27, 2009, 10:19:53 AM »
I use these:
http://www.slackiller.com/hlprograms/zhlt253-17.zip

I can't change your name though, I don't have that ability ;)

OneShot

Re: New to mapping? READ THIS!
« Reply #5 on: October 30, 2009, 04:14:27 PM »
thanks.. I got it and set it all up.. I keep getting this message saying there is no player spawns although I do have spawns for each side.. I tried to troubleshoot it a bit but got no where.. Do you know of any sites that have information on mapping problems so I don't have to bug ya all the time :P


also, where/who should I request to get my name changed..

Naecroknight

Re: New to mapping? READ THIS!
« Reply #6 on: November 10, 2009, 05:11:54 PM »
lol OneShot. I bug Spirit all the time about mapping...He is use to it
|CoR| Pvt-Naecroknight*GI* - Mapper Novice


|CoR| Fiyastone

Re: Level Design 101: Getting Started
« Reply #7 on: October 24, 2010, 08:27:29 AM »
Bump






On a more serious note...

Creating a minimap for your map can be fairly frustrating if you forget your commands, so I created an alias that you can bind to simplify your life and jog your memory over the process.

As this is a mapping forum, I expect the map creator that is using this alias would know what each command does and how to add this to your userconfig.

The code below can be pasted into your  userconfig.cfg
Code: [Select]
// Create Map Overview Screenshot
alias MapOverview_information1 "echo ----------------------; echo Settings base screenshot settings; echo Make sure display mode is set to 1024x768; echo May need to press +map (m) to get map to display"
alias MapOverview_information2 "echo Make sure to launch game with -dev command switch to use this functionality; r_fullbright 1"
alias MapOverview_controls1 "echo ----------------------; echo +forward (W) - Shift screen left; echo +backward (S) - Shift screen right; echo +moveright (D) - Shift screen up; echo +moveleft (A) - Shift screen down"
alias MapOverview_controls2 "echo +jump (Spacebar) - Removes floors from bottom; echo +duck (Control) - Add floors from bottom; echo +moveup (') - Add Floors from the top"
alias MapOverview_controls3 "echo +movedown (/) - Removes floors from top; echo +attack1 (Left Click) - Increase zoom; echo +attack2 (Right Click) - Decrease Zoom; echo ----------------------"
alias MapOverview_1 "MapOverview_information1; MapOverview_information2; MapOverview_controls1; MapOverview_controls2; MapOverview_controls3; alias MapOverview MapOverview_2 "
alias MapOverview_2 "echo Enabling dev_overview screenshot; developer 1; dev_overview 1; alias MapOverview MapOverview_3 "
alias MapOverview_3 "echo Taking screenshot of coordinates; echo ----------------------; snapshot; echo ----------------------; developer 0; alias MapOverview MapOverview_4 "
alias MapOverview_4 "echo Enabling dev_overview blank screen; dev_overview 2; hud_draw 0; net_graph 0; alias MapOverview MapOverview_5 "
alias MapOverview_5 "echo Taking screenshot of minimap; echo ----------------------; snapshot; echo ----------------------; alias MapOverview MapOverview_6 "
alias MapOverview_finish1 "r_fullbright 0; hud_draw 1; net_graph 3; dev_overview 0"
alias MapOverview_finish2 "echo Reseting configs back to normal; echo ----------------------; echo Please check your dod folder for the two most recent screenshots for this map"
alias MapOverview_finish3 "echo The first map contains the coordinates required; echo Zoom A Origin(B, C, x), ZMin x, ZMax D, Rotated E; echo Use the values in A, B, C, D, and E"
alias MapOverview_finish4 "echo global; echo - ZOOM A; echo - ORIGIN B C D; echo - ROTATED E; echo layer; echo - IMAGE overviews <mapname>; echo - HEIGHT D; echo --------------"
alias MapOverview_6 "MapOverview_finish1; MapOverview_finish2; MapOverview_finish3; MapOverview_finish4; alias MapOverview MapOverview_1"
alias MapOverview "MapOverview_1"
echo ** Map Overview Creation Alias Enabled - bind a key to MapOverview to go through a step by step process for creating map overviews
echo -- New Commands added: MapOverview



What it looks like in your console without the developer spam when you use it. (NOTE: Give pause before taking the 2nd screenshot to let the developer coordinate information disappear from the screen (takes about 5 seconds from taking the first screenshot)  )
Quote
** Map Overview Creation Alias Enabled - bind a key to MapOverview to go through a step by step process for creating map overviews
-- New Commands added : MapOverview
] MapOverview
----------------------
Settings base screenshot settings
Make sure display mode is set to 124x768
May need to press +map ( m ) to get map to display
Make sure to launch game with -dev command switch to use this functionality
----------------------
+forward ( W ) - Shift screen left
+backward ( S ) - Shift screen right
+moveright ( D ) - Shift screen up
+moveleft ( A ) - Shift screen down
+jump ( Spacebar ) - Removes floors from bottom
+duck ( Control ) - Add floors from bottom
+moveup ( ' ) - Add Floors from the top
+movedown ( / ) - Removes floors from top
+attack1 ( Left Click ) - ncrease zoom
+attack2 ( Right Click ) - Decrease Zoom
----------------------
] MapOverview
Enabling dev_overview screenshot
] MapOverview 
Taking screenshot of coordinates
----------------------
Snapshot saved as <mapname>0001.bmp
----------------------
] MapOverview 
Enabling dev_overview blank screen
] MapOverview 
Taking screenshot of minimap
----------------------
Snapshot saved as <mapname>0002.bmp
----------------------
] MapOverview 
Reseting configs back to normal
----------------------
Please check your dod folder for the two most recent screenshots for this map
The first map contains the coordinates required
Zoom A Origin ( B , C , x ) , ZMin x , ZMax D , Rotated E
Use the values in A , B , C , D , and E
global
- ZOOM A
- ORIGIN B C D
- ROTATED E
layer
- IMAGE overviews <mapname>
- HEIGHT D
--------------

|CoR| SpiritVII

Re: Level Design 101: Getting Started
« Reply #8 on: October 24, 2010, 03:47:26 PM »
Awesome Fiya :)

|CoR| Judah

Re: Level Design 101: Getting Started
« Reply #9 on: January 25, 2011, 09:39:57 AM »
SPIRIT!!! I NEED YOUR HELP!

I am trying to spawn weapons in an armory for source, that people can pick up. I found a tutorial on ammo boxes, but nothing on weapons...

Any clues??? Even a nudge in the right direction would be awesome.