Post Mortem of the Half Life Engine and Game by qvs59240


									Post Mortem of the Half Life Engine and Game Design

The Half Life Engine was created in 1998 and was spawned from the already
popular Quake Engine. The game has become the most and successful game in
history in regards to user modification and sheer community support in
modifications. Under goggle, there are latterly 100‟s of sites dedicated to mod
development using Half Life. Why mod development has been so successful
with Half Life is due to several reasons. First of all, Valve software, the main
engineers of the Half Life engine have continuously supported the mod
community by releasing engine code, and tools for development. The skills
learned in Half Life mod development are transferable to many games and many
of the best mod developers have already landed jobs at some of the most
prominent game companies. The Half Life engine is already based on the highly
successful Quake engine, which is relatively bug free and highly modifiable.
Since Half Life is based on Quake engine code, it not only enhances the original
engine but also adds many options, specifically scripting techniques not originally
available. The most important reason though is the availability of the Half Life
engine to would be game developers. The Half Life engine can run on a P233
relatively smoothly, and we all know, many people have systems that far surpass
such requirements. The fact that the graphics of the original engine still hold up
to today standards is a testament to how powerful the engine is. We will take a
look at this engine, how to develop for it and make your own first person

Half Life mod development is extremely complicated. It stems into all veins of
game development, such as audio, art, game design, code. You can basically
think of the Valve software as giving us an actual engine, and we get to build the
other components of it. Now what I mean by an game engine are various pieces
of code that come together into a coherent piece. These various parts of code
include a rendering engine (for graphics), audio, artificial intelligence engine, and
many more parts. Valve gives us this skeleton, along with already predefined
„objects‟ to use. We can use these objects, such as Half Life‟s actual game
textures, sounds, models, etc…or use our very own. But do not take this lightly.
Building models, sounds and textures incorporates hundreds of hours of work.
Like all pieces of software, once a game level or mod has been created, many
hours of testing, and optimization are required.

Let‟s look at the various tools we need to start our game development.
Basic Mod Development

The commercial game Half Life, by Valve Software
WorldCraft, freeware level architecture and scripting tool

Advance Mod Development

Wally – texturing tool
Pak Explorer
Model Viewer

Areas of Mod development

What is a modification (Mod)?

A modification, or rather mod, is a slang term used my game development
communities that refer to various games developed using an already existing
game engine. Mod communities have been around for a long time and various
games have various mod communities that support it. Half Life is by far the
biggest and has continously proven so over the year, in the face of new
technology. Mod communities, and modifications can be attributed to the game
DOOM, which was made by id software. Doom had a massive mod community.
Thousands of user made maps were released to the public for multiplayer and
single player excursions in carnage. The developers of DOOM went on to create
the highly successful game Quake, which then spawned Quake II, Quake III
Arena, and it‟s many also highly successful mod communities. 3D Realms also
released the Duke Nukem 3D engine that was a step above the original doom
engine. As game engines became more complicated, freeware user developed
tools were released to the public to allow for greater degrees of modification.
The Half Engine is slightly more powerful than the Quake II engine in graphical
rendering ability, and below the Quake III Arena engine. The more recent the
engine, the smaller the mod community because powerful engines require
extremely powerful computing system to compile maps together, render light
maps, etc.

Here are a list of the more popular game engines from oldest to newest:

Duke Nukem 3D
Quake II
Half Life
Quake III Arena / Unreal Tournament
Unreal 2003
DOOM III (to be released, but promised to be highly modifiable)

Why do Companies allow their engines to be used?

By giving the public access to their engines, the public is allowed to continuously
support their games so the company is looked at favorably. Continuous interest
in a companies games supports the companies revenues as well. Companies
are always on the lookout for game designers, programmers, etc. By having
modifiable games out there, the public has access to real and powerful game
software. When Half Life 2 is released, it will generate massive income for the
company since the first game has withstood a 4/5 year lifespan.

I notice all these game are first person shooters…are there any other modifiable
games that are different?
Definitely. Games like, Max Payne, Jedi Knight are all modifiable and also have
a decent mod community backing them up. However, mod communities in
games like this dwindle and fade. So it is s till more rare. However, companies
themselves are always releasing „expansion‟ paks on games like these that are
often the result of collaborative efforts by amateur game designers. Half Life's:
Counterstrike has become one of the most popular modifications ever to grace
the world. Valve was so impressed by it, they pre-package Half Life with

Parts of a Half Life Modification

Game Design and Architecture: The bulk of this learning object will be spent
on this. Game architecture is where the rubber hits the road in game
development. It is much like designing software and many issues such as
cohesion and coupling of a game‟s structure is taken into account. The process
takes many seemingly abstract concepts and brings them together i nto an
optimized, bug free environment.

Sound and audio design: Like a movie, a game is nothing without sound. It is
a distinct part of game design and how Half Life engine handles sound is very
simple, intuitive, and yet powerful. Great sound design in a game is often the
polishing touch that hints at professionalism. You can‟t see it, so its effects on
the player are not so conscious and in your face as the actual computer graphics
and impressive polygon counts.

Scripting: Scripting is a fairly old concept in game design, however, more
advance scripting is much akin to setting up a shot in a movie. It‟s used to create
more dynamic environments for the user to interact with.

Compiling and technical limitations: One cannot design for a game engine
without knowing the technical limitations and simple math for the game engine.
Frame rates must be fluid, and many bugs in mods are attributed to poor polygon


This is perhaps one of the most important sections in this learning object. The
terminology is fairly straightforward, but much slang is used in the mod
communities to refer to various design, and technical aspects of modding with 3D
based game engines.

Brush: Brushes refer to polygon structures in a 3D game world . When we lay
out a map, or level architecture, we use brushes. Game engines always have a
„primitive‟ set of brushes to use. Those are cubes, cylinders, triangles, and
several others. Theses predefined brushes can be manipulated in many ways.
For example, a cube has six sides, and has a 8 edges. These points can be
manipulated in many ways to build different, more complex shapes in the level
architecture. One must be careful when using vertex manipulation because
some polygon shapes (brushes) cannot be rendered by the engine and are too
complicated or make an invalid shape.

Vertex: A vertex is where two lines on a polygon meet. At this point, they form a
vertex. Vertex can often be manipulated for complex architecture, but is often
difficult because the engine can only handle „valid‟ polygon shapes.

Entities: Game engines are populated by entities. Entities range in purpose and
form but are generally used to produce various effects in the game world. You
can think of entities as anything that is outside of the actual polygon structure of
the architecture. For example, characters in the games, enemies, lighting
effects, particle effects, scripts, triggers, these are all handled by various entities
that are placed within the level. Must like a movie, these entities can refer to the
various people on a movie set…actors, lighting crew, sound crew etc. A typical
Half Life level has anywhere between 50 to 100 entities producing various

Since Entities are such an important part of game creation we will discuss them
more. There are latterly hundred of different entities in Half Life, and most of the
entities are used in some form or another in other games. The usage of entities
is limited only by imagination and how one uses them is vital in a successful

Compiling: Compiling a level is when the engine does its work. During this
process it does many things, including checking for invalid polygon architecture,
calculating the lighting for the level (often the most strenuous process), setting up
texture placement, entities, and more. Compiling a level is often the longest
process and it is possible to make highly complex level design with good brush
work. The better one‟s brush work, usually the faster the compile time.

Player: Player refers to the main character, often who the user takes part of.
Different games offer different perspectives on games. Some are third person
(player views the game character from behind); others are first person (players
takes the first person perspective of the character). Half Life is, of course, first

Enemies: Present challenges to the player, often the player has to avoid or kill
the enemies.

NPC: Non Playable Characters are often characters the player can interact with.
They often help direct the player or provide an objective to the player in the game
world. For example, Half Life has a very sophisticated, and pioneered some of
the most advance NPC‟s. Scientist populate the Half Life world, players can
wonder up to them, talk to them, escort them, search them if they are killed,
protect them, or gain valuable hints from them. NPC‟s are also abundant in Role
Playing Games, where whole worlds are often created, NPC‟s populate the world
to bring it to life.

Game Design Theory

It can‟t be stressed how often one goes into map-making without ever planning a
map from beginning to end. Most people don‟t like this as they love to jump into
an editor and start placing random hallways together with big bulky rooms. This
only works for a little while. Without a vision, a map will finally decay into array of
aimless rooms and long hallways.

Keeping it simple at first works best. It is also a good idea, when designing a
map, to go through a conceptual stage. Ask yourself the following questions.
What are the player‟s goals? What makes them want to play your map? Where
does it take place? And so on. Giving yourself a good idea of a concept is a
great leap. It saves you time from twiddling with textures and what not
(presuming you are doing texturing yourself). In general, getting a plan laid out is
your best first start.

Another important question to ask yourself is what type of locale not only
interests you, but your audience. Remember, unless you are making a map for
the heck of it, you most likely have an audience to please. Your home is not
a good start for a map. Sure it might be an exact replica of your house down to
the cheetos all over your room floor, but no one wants to play in such a mundane
environment. How about an alien planet? A factory? Of course, these have been
done a million times before, but you get the idea.

Drawing a sketch of your map(s) on paper is great as an initial guide. Many maps
have been made that have been scraped due to lack of vision. Players often
have no goals and end up wandering around a boring level. Try to be diverse in
player-oriented goals and stick with them. Speaking from experience, it is a
challenge to create a good single player mini-adventure from start to scratch. It
takes time, and good planning.
Designing fun levels is a science. One must take, seemingly abstract concepts
such as fun, emotion, etcetera, and weave them together. In a FPS environment,
a level designers utmost goal is to ‟immerse‟ the player into the environment.
If a person is glued to their screen gripping their keyboard (or controller), you
know they are interested, and can derive from that, that they are having fun.


Knowing what medium your working with can help you in creating your level and
sticking to the goals you have laid out (or at the very least, compromise).

The BUILD engine for example was quite flexible even though it was not true 3D,
as with Quake . For example, levels with the BUILD engine could be massive,
with extremely far draw distance. Since enemies were sprites, not a whole lot of
computation power is needed to display many on a screen as opposed to Half-
Life ,Unreal , etcetera, where the NPC‟s are all fully polygonal.

As with the Half-Life engine, knowing its limitations can be viewed as an asset.
This allows you to spend time to plan your crazy scripts and events in the level
without running into engine troubles. For example, many people familiar with the
Half-Life engine all know that it's not particularly great with outdoor
environments. That is not to say it can‟t be done because we have seen
wondrous outdoor environments in Half-Life . However, having large
environments creates engine burden. There are many tricks one can use to
overcome these limitations, however knowing these limitations in the first place is
the only way as a level designer, that your going to be able to create those killer

All in all, know your engine; know what you can do, and what you can‟t do.
Besides, would you think it‟s really possible to create a level with hundreds of
Black Mesa Soldiers fighting each other as you view it all from above?

Each engine has polygon limits, texture limits, light data limits, and so on. Having
more characters on a screen not only creates polygon burden on the graphics
engine, but the engine also has to calculate all that AI, and texture all those


It‟s very effortless to acquire inspiration from real world locales. Reality is a great
source of inspiration for game worlds. However, due to engine limitations it‟s
often hard to create exact replicas of buildings. Modeling such replicas
would be a waste of time and impossible to do at this current age o f technology.
Grabbing architectural elements from the real world, and re -creating them
with less complex geometry is a great way to inspire yourself, and make
your level make some technical sense, if you so desire.

A big mistake I see with a lot of Half Life levels is the overuse of geometry to
convey an image that a texture map could do. Textures are there for the sole
reasons of making your flat worlds have depth and detail. You don‟t have to
model every single stone for your building because your texture will help convey
that message. With good use of textures, it‟s easy to make someone believe
that they are seeing complex geometry when they‟re not.


When starting out a level, or a project or levels strung together, most people
often get creating reality confused with, well creating reality. Let me explain.

To immerse a player within an environment, the designer often has to create little
mundane details within the levels. For example, le t‟s look at Quake II. Upon
starting your single player quest, you can see drop ships streaming by, creating
a world. Most people aren‟t interested in seeing every single detail or being able
(or having to do everything). For example most RPG‟s don‟t have you changing
the characters clothes or making them go to the bathroom. Making a player
monitor a hygiene meter is probably not very fun. So in creating reality were not
really trying to create our modern world, but rather, a living breathing world that
takes recognizable elements from our world, and mixes it with the game world.

A mistake often made by newbie‟s is a lack of continuity between worlds, or
levels. Imagine playing a level in half-life where you see a certain brick texture
set used, only to see a metal texture set used when you get to the next section.
This is not believable, and each room, or map, does not flow nicely. An
audience likes to see a certain amount of continuity. Just look how most
buildings are made. The 1st floor of a hotel isn‟t radically different than the 2nd
floor. Elements such as continuity in the environment is a real world notion that
people are comfortable with, that they like to see within their game. Give the
player familiar elements, mixed in with unfamiliar. The combination of these
things can create a realistic setting. If your game takes place in a fantasy world,
there can always be familiar elements so the player can attach to the world.


Often a nice way to create a sense of depth in your game world is to have
„landmarks.‟ These can be visual treats to the player that they can easily
recognize. An example of a landmark could be a vast scenic view (provided your
engine can handle it), or even a statue.

Landmarks often give a level personality, and also give the player a break from
hallway wandering. Landmarks can also serve as a way to direct the player to a
certain locales. Let‟s say X is trying to make it the Secret Lab hidden deep within
the mountains. At a point in the level, you could have the player reach a peak
from which he can see Secret Lab. In a sense, landmarks have an important
purpose, and should not be overused.

Often in games, designers will have focus points. That is, areas in the
game that automatically catch your eye. Think of a dark hallway with lights
guiding you. Or an empty room with just a box in the middle. I've found it useful to
use these as points to script a sequence. That way, the player won't miss
anything important, as they are more likely to look at that area when the script

Single Player games

Focus and Continuity

Video games are often made of a number of levels. New games tend to stress a
continuity between games, meaning a high cohesive atmosphere. Every level is
made up of singular goals, which eventually all must contribute to the completion
of the major goal. This is a factor many designers forget. New technology or
technical issues arise that cause the designer to shift focus. As a result, later
maps will shift focus and if not integrated well, will cause much error. Designers
are often highly involved with the level creation, but must take a step back from
the production on occasion and see the overall picture.

Cohesion between levels is of utmost importance. We can support cohesive
behavior by sticking to limited sets of texture designs between levels. For
example, games like Half Life and Quake often make the player believe they are
in one MASSIVE level. Thus the player never ever progresses to a level 2, but
rather, deeper and deeper into the game world. They do this by splitting the
whole game into individual little pieces and connect them all together through
brief loading screens. That way, the player can travel back and forth between
maps if they so wish. This gives an epic feeling.

Single player games have a fairly linear flow, and archietcure is there to provide
focus and direction for the player. The problem with having an open ended game
is that the player can often end up wandering around aimlessly. Keeping focus
on designing a level often involves tracking issues like sub-missions and mini-
missions. A hierarchal tree structure is very helpful in planning this.

Another issue in focus is wheater or not a designer wants to make a map single
player, or multiplayer. This is a huge concern with the Half Life engine
specifically. It‟s considered best to stick to just one. Deatmatch games often
tend to have cyclical designs, while single player tend to have a more linear flow.
Essentially archecture becomes a roadmap, hence a focus of continuity. A well
designed linear structure, without simply being tedious in nature (ie a straight
long boring hallway), will have focus. Many things bring continuity together. This
ranges from sound, texture, repetition and rhythm of levels. A nice touch in 3D
development is designing a game or level/environement to feel as if there is more
out there. Creating areas that are simply unreachable by foot at to the cohesion
of the level. “Create architexture that sweeps out past the playing area” says
Willits (pg114, gamesages). See the landmarks section for more information on

General Level Design Tips

Know what you want to do with a level before you make it. Single player maps
do not become multiplayer maps easily.

Sketch out a diagram, make a floorplan.

Start small, refine it.

Try to be frsth and original.

Do archetexture studies ahead of time.

World Craft Fun

The World Craft Interface

Knowing how to get around WorldCraft is essential to exploiting all the flexibility
of the Half Life engine.

WorldCraft Interface

The interface to WorldCraft is quite in depth and can be overwhelming at times.
For the amateur map maker, many of the tools used in WorldCraft will never be
put to use. This learning objects purpose is not to give the reader an in depth
view at all of WorldCrafts functions, but rather, a wide and shallow view. Most of
the things in Worldcraft are quite
Simple to explain anyway, and others are part of a process of discovering. Using
the various tools to create different brushes is explained thourgly in the
WorldCraft Help Menu, as it provides tutorials for beginners to get on their feet in
actually putting the tools to use.
The interface is laid out very well.

The Selection Tool selects the various polygons and entities on your map.
When WorldCraft if set up and opened, you will have nothing. First, go to File
New, to create a new map. Unselected polygons/brushes/entities are colour
coded. A selected item is highlighted in red. Usually, clicking on a polygon
several times in the grid view will allow you to do different things to the polygon.
Clicking on it once, will let you resize it.
Clicking on the same item again let‟s you rotate it, and clicking on it once more
lets you twist the polygon. Clicking on it once more, let‟s you resize it…and so
on. If you click down and hold on a particular bush. You can drag it around and
place it anywhere
In your 3D workspace.

The magnify Tool let‟s you zoom in on the various grid views.

Camera let‟s you move around in the 3D view space. You can travel anywhere
by clicking on the 3D view and moving the mouse, along with various specific
mouse button combinations. By holding SHIFT, and clicking on the grid view,
you can actually lay out
Various camera objects around to help you navigate in your 3d world. In Grid
view, “the dot is the camera's position, and this is where the 3D camera view will
originate. The red line is the camera's viewing angle. You can adjust either end of
the line to change the view”.

Entity Tool: Possibly the most complicated tool in WorldCraft. This let‟s you lay
entity objects in your level.


        Env Entities – these are generally special effects in the environment,
        they enclude
                  Sparks, lasers, glows, halos, etc. These can be combined in
                  Thousands of ways to create different effects.

Func Entities – these entities are considered to be the most important of
the Half Life entities.
                 They provide various functions to the game world such
as doors, switches,
                  And so on.

Info Entities – these generally aid the game engine in creating a playable
environment. They are similar to Func Entities, but are group differently.
Info_Player_Start is included in every map, and
Tells the game engine where the player is located. This entity is placed
in the game world
Wherever you want the player to start.

Miscellaneous – we can ignore most of these entities since they will
never be used in this learning object. However there are several that are
of great importance. First, we have an ambient_generic, which allows us
to add sound in the game. Since Half Life uses 3D sound, the sound will
eminate from where ever that entity is placed in the level. There are
exceptions to this. Aiscripted_sequence, and scripted_sequence allows
for scripting events in the game, much like a movie. Muli_manager is an
entity that handles other entities. For example, if you want to trigger
various things in a specific sequence, you can time them in a particular
order using the multimanager.

Monsters – the monsters specific to the game…in this case, Half Life
Triggers - these trigger entities are used to trigger other entities. To
      trigger the trigger entities, the player simply has to pass through them in
      the game world. These triggers are not normal entities. They are in fact,
      brushes that have been made into entities.

      Weapons, Ammo, and Items – self explanatory…this is a game after all.

Navigation in WorldCraft

When a map or a new map is opened, we are presented with four views, split
through a vertical and horizontal access.

The Top Left view is the 3D view (camera), and the other three views are various
combinations of XYZ. These are the grid views. The top right grid view shows
an x/y view, the bottom left shows a y/z, and the last shows an x/z view. Using
these views, and the 3D view, one can navigate the game world.

3D view
The 3D view is generally displayed as wireframe when a map is loaded up.
However, you can change the 3D view to get an even better view of what the
game world will look like when actually played. That is, minus lighting and
various other issues.

This is wireframe view, notice it is extremely messy and complex since you can
see the all the hallways, and can‟t distinguish anything very well. It is used if
your system resources are can‟t handle displaying a full 3d view.
Flat Shaded view is much better. It shows the various brushes in the game world
without any texturing. Notice, each brush is color coded to show it is a separate
brush. The purple objects in the screen are entities.
This is the textured 3d view and is the best view to work in. You can see all the
textures you have applied in that current location. Remember, this renders on
the fly so you can actually navigate your 3D world! How exciting. The green
object in the center is also
An entity. Entities come in various colors.

The official WorldCraft help menu states

“The 3D window is a dynamic 3D space where you can view your level from any
angle. This is critical for checking textures and texture alignment, spotting leaks
and just getting a sense of what your finished level will look like.”

Submenus in WorldCraft

When you click on the main interface menu‟s in WorldCraft, a new submenu may
pop up. Here are several key submenus. When clicking on the Brush/block icon,
Is a submenu on the right hand side of the screen (always readily available) that
let‟s you create and do different things to brushes.
Categories are different types of brush categories. You can even make your
own. Primitives is the main one we want. When selected, we can choose in
objects, block, wedge, cyclinder, spike, or arch as our primitives. Once selected,
you can draw a polygon out on grid view. Press enter to confirm and create.
The other categories are those made by the Half Life team, such as premade
computers, objects, and other things to populate the game world. This is simply
for a convience. We call these Prefabs…or Prefabricated materials.
When you click on texturing, you get this menu. Here you can adjust a texture
accordingly. To apply a texture, you actually just select the specific face of a
polygon you want to texture. By holding shift, you select all the faces on a
particular brush. By holding Ctrl, you can select a group of faces to texture. For
example, a wall that is made out of multiple brushes. You can adjust the axis
and placement of the texture, as well as BROWSE the hundreds of premade
textures used in Half Life. You can even make your own using a program called
Wally. Half Life, like most 3D games have their textures in what we call .WAD
files. In other games, they have different names to signify the package of
textures. There are hundreds of different .WAD files floating around the net
people have made.
There are many more menus and various options in WorldCraft. This brief
introduction though should be more than enough to set you on your way to
building exciting levels. Next, we will actually build a real level of the University
of Saskatchewans Place Riel. We can learn a lot about game design, and the
Half Life engine simply by doing. Follow this tutorial, and we will go over the ins
and outs of the engine, how to create a simple world, from start to finish.

Half Life Engine Metrics, and Tech

Several things are key before we start our Half Life level. First of all, we need to
set up WorldCraft to accept Half Life. In fact, you can use WorldCraft with many
games, including Quake, and Unreal. To do this, WorldCraft has a grea t tutorial
on how to get passed this initial hurdle. It mostly involves finding various files
given with the game engine. These include *.wad files (texture pakaages),
*.fgds, lighting files, etc.
Worldcraft 3.0 even includes this set up guide, along with description visuals.

Building a simple level

Designing and building a level from scratch takes many hours and many issues have to be
considered. These include cohesion between all the maps, level areas, etc. There is also
a certain amount of technical limitations that must be take into consideration. For
example, Half Life cannot build large open areas, as this is taking on the engine.
However, with the right skills in polygon manipulation, it is nevertheless possible into
‘tricking’ the player into thinking they are in a larger place than they think.

Sketching the initial design. For this 3D world, we are going to recreate Place Riel, at the
University of Saskatcewan.


There are varying reasons for archeitecture in a level. First of all, various
archetexture not only provides an important visual cue to the player, but also
limits the players freedom within the game world. Half Life is know for it‟s
extraorfdinary level design. Without good level design, a game is deemed
useless. All the coding, sound, and artwork come together in this process. It is
generally known to be where the rubber hits the road. Worldcraft provides us
with several ways to build game levels.
We build the game world using „brushes‟. These are in fact polygons. Worldcraft
has several premade brushes, such as squares and wedges. These can all be
adjusted by the level designer in various ways to bring a level together.

Let‟s explore designing levels using the Half Life Engine.


I can't stress the importance of lighting. Lighting makes or breaks a level, model,
etc. Lighting is highly stressed in CGI environments and considered top priority
above modeling. You have all no doubt seen PS2 games that have models
that look better than the CGI in ps1 games right. So why doesn't it look as good
as the CGI in ps1 games, despite the high polygon counts? The answer is
because we still find it difficult to render lights in real-time. There are many ways
to fake it though. Real-time lighting is too CPU intensive, and usually only high-
octane systems can pull it off.

In WorldCraft, there are several light entities that are all calculated prior to the
actual running of the game. It's up to you where the lights go, etc, and despite
the fact that HALF LIFE doesn't render real-time lights (around the level that is),
you can still pull of many great tricks with the basic light building blocks.

Here's a small rundown of lights in Half Life, and their properties.

Basic Properties

light (regular normal light) - this is a very useful entity, but it actually not used
that much in the game. However, combining it with textured lights can
create great effects.
Name : This is the name of the light. If you want it to be triggered by something,
it must have a name.

Brightness : This is basically your light levels. You can choose color picker to
pick out the light color. The first 3 digits represent brightness level and has a
default of 255. When you adjust the light color, sometimes the brightness will go
wack, so adjust it accordingly.

Appearance : These are preset lighting effects. To have the light flicker, set it
to flicker. The light will then turn on and off, sort of like a damaged bulb. Many
different effects here.

Flags :
Initially dark - check this off, and the light will be turned off. You can turn it
back on if you have it set up to a triggered event. If you have a light switch for
example, you DO NOT have to check this. This is just so the light will be off when
you first enter the level.

Light Environment - if you want to light a large area, or have some ambient light
that travels across a big enough area, you can use Light Environment. The catch
is the light is projected from the SKY texture. So the SKY texture must be
present in the area. Basically it gives you somewhat natural outdoors lighting.

Pitch - the angle at which the light hits the brushes
Brightness - same as normal light

Light Spot - light spot works much like a spot light, and is great for creating
lighting effects targeted upon a certain area, for example, a flash light is on
the ground...use light spot to target a spot on the wall where the flash light hits. It
gives you slightly more control than the normal light entity.

First of all lighting takes up a lot of CPU power to calculate, even when its not
rendered in real-time. Chalk it up to the Half Life compiler for such slow
compilation times. Calculating lighting is very complicated, but essential to
understanding how to light well, and effectively. The minute you have too many
light entities in a condensed area, expect compilation times to go up. There is
one more way of lighting, which is by far the most effective and important, and
that is, textured lighting. Not only is it convenient to use, but also allows levels to
have more natural lighting.
Normal Lighting

QuickTime™ an d a TIFF (Uncompressed) decompre ssor are need ed to see this p icture .

Point Lighting

QuickTime™ an d a TIFF (Uncompressed) decompre ssor are need ed to see this p icture .
Textured Lighting

QuickTime™ an d a TIFF (Uncompressed) decompre ssor are need ed to see this p icture .

Combined Textured Lighting and Normal Light

QuickTime™ an d a TIFF (Uncompressed) decompre ssor are need ed to see this p icture .
actually, understanding lighting is much beyond the scope of this. Like how light
work, irradiance, ambience, what not. Most expert level designers definitely take
factors like this into account.

One of the worst mistakes I see in game mods made my amateurs are the lights
themselves. Most people have been brought up, for some strange reason,
believing that lights are always cubical in shape. And they are simply there for
lighting the level. Most people don't take into account that they can act as an
intricate part of game play. By making a brush that is function_breakable, you
could shoot the brush, and when that brush is triggered, simply trigger a light
entity to go off. That way you could have shootable lights. True, it wouldn't make
too much difference in game play as enemies can still see you in the game
engine, but it would make it quite more challenging, and realistic for you. Lights
often have wires coming out of them, connection cords that is. Now, while it is
taking on the Half Life engine to make such small intricate brushes, you could
easily make them customized sprites.

Here are some interesting things to do with lights, including how to make a light
switch able, etc.
     1. Switch able Lights
     2.Light Architecture

Switchable Lights

Making switchable lights in using the Half Life Engine is incredibly simple. First
there are many ways you can 'switch' on a light entity. You could trigger it by
having the player push a button, passing through a trigger function, or it could be
a part of a more complex relay system (multi_manager).

Let's take a quick look at all of them and why and how you could use them.

QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture.

Above are light switch textures. They start with +. The following letter 0
corresponds to one switch position, while A corresponds to the next. This
naming scheme is important if you are actually creating your own textures
using Wally or something.

First, make a box, and put on the switch texture on them. You only put one on,
and once the player goes up to the texture in the game, and 'uses' it, the texture
automatically changes. Use it again and the texture goes back to it's first
texture...much like an on and off switch. Note, the brush this texture is on has to
be a function_switch.
Cosmetically, this is all you really need for a switchable light. Now all you have to
do is connect them all up to various entities. We will need two for a basic light
switch setup.
      1. light entity
      2. function_switch entity

Basically, the player toggles the function_switch , which targets the name of the
light entity, and the light either goes on or off depending on the various settings
you can pull off on a light.


I'll keep this relatively simple. Keep in mind, lights usually dot a level. There are
tons of lights in any regular Half Life level. Even more so in the newer game
engines. So you don't want to litter your level with highly complicated lights.
Nevertheless, anything is usually better than a cubical light.

QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture.


Let's get going on some nice looking light fixtures. Now all this really depends on
what type of mod you are making. Mods that are multiplayer often can't afford
exquisite lighting fixtures, as frame rate is king above all. But in single player, one
can often afford to take some other liberties. Let's start. Our best friends for
brush work are actually two of the most complicated tools in Worldcraft. The clip
tool, and vertex manipulation tool. Let's make something that looks more like a
light fixture:

    QuickTime™ and a TIFF (Uncompressed ) d ecompressor are needed to see this picture.

Create a spike, with at least 8 sides.

    QuickTime™ and a TIFF (Uncompressed ) d ecompressor are needed to see this picture.

Create a 'spike' primitive, and using the clip tool, cut off the top half. You should
be left with a lampshade shaped brush. This is a great 'generic' shape for a light
fixture, of course, its only limited by your imagination.
    QuickTime™ and a TIFF (Uncompressed ) d ecompressor are needed to see this picture.

Making the actual bulb is quite simple, yet requires a few tricks if you want to
make it transparent properly. All it is, are 4 cubes that have had their vertices
manipulated a bit. Simply create a small cube. Go to vertex manipulation mode,
and for each of the four corners, select the vertex. Only select one vertex, not
a whole side , and do it only for one side. Drag the vertex in. Do this for the
other 3 vertices on each of the corners. This will make the box into a pyramid
shape, with a flat top of course. From the side view, you can see the box
becomes trapezoid in shape.

When dragging in the four corners, drag them all in at an equal length. If they are
off, or one corner is in more than the other, you most likely will get an invalid
solid error.

This basically serves as a simplified rounded off end for the bulb.

When texturing the bulb, make it a function wall, and set it to texture, and the
transparency to around 140. However, if you leave it at that, your bulb will come
out funny. That is because since each of the four cubes are actually separate,
you will still see the 'base' of each cube. You have to go into the actual polygon
bulb in texture mode, and use the '{' blue mask texture on the insides.
This gives you a clean transparent bulb.
    QuickTime™ and a TIFF (Uncompressed ) d ecompressor are needed to see this picture.

The wires themselves are very simple. They are just function_wall surrounded by
the '{' mask texture. Then, for two sides, I put a texture on it.

To top