Getting
started with SinEd - Part I by Eutectic
|
1.
Introduction
|
The goal of
this tutorial is to help you get acquainted with SinEd by
making a simple room and using all of it's basic features as
we go along. You will be guided through a set of step-by-step
instructions to make your first room and compile your first
SiN map.
Of course, I'm assuming you have SinEd
installed and running. Another thing: SinEd makes extensive
use of the middle button of a 3-button mouse and my
tutorials are written accordingly. So it is strongly
recommended you get one first.
|
2. How to
make a simple room
|
Launch
SinEd.
|
Click on the Textures menu selection and
choose the hq texture folder. I'll be using it in this
tutorial but basically, you can choose any texture folder you
want. The textures from the hq folder will be loaded in SinEd
and the texture selection window will automatically be placed
in the foreground. |
Scroll down the texture selection window by
placing your mouse cursor inside the window and doing a
RightClick-Drag. Select the hc_wall1 texture.
Note the text in the window's top bar:
Textures: hq/wl_hcwall1 w 128 h
128
This is the folder, name, width and
height of the currently selected texture. I chose this texture
but basically, you can choose any texture you want. At this
point, every brush you draw in the 2D view will use this
texture until you select another one.
|
Bring the
the XY 2D view (top view) to the foreground by clicking
on it. Set the grid to 64 x 64 by hitting the 7
key. Zoom out with the Insert key and zoom in with the
Delete key. Scroll the view by placing your mouse
cursor inside it and using RightClick-Drag in any
direction you want.
Play with the view keys until you
are familiar with them and place your view until the grid
location numbers 128 and -128 on the leftmost
and upper boundaries of the view are visible as shown in the
image below:
|

Note the position of the mouse
cursor:
XY (-128,
128)
This is the starting location we will
use to draw the first brush. Left-click, and while holding the
button down... |

... drag the mouse right and down until
your cursor is at the location:
XY (128, -128)
as shown on
the left. Release the mouse button. |

Now we need to set the height of
the brush to change the 2D view to the XZ view (front
view) by pressing the NumLock key once. Scroll down the
view (RightClick-Drag) until you see the Z 256
coordinate on its upper left boundary.
Place the mouse
cursor right above the top edge of the brush,
left-click, and while holding the button down... |

... drag the mouse straight up until the
top edge of the brush is at the Z 256 line. Release the
mouse button.
The brush is done. It's a 256 x 256 x 256
cube. |
Since what we want to make is a room with 4
walls, a floor and a ceiling. We actually need 6 brushes to do
this. Of course, we could draw, resize and move each brush
individually but there's a much easier and quicker way to do
this: the brush hollowing tool.
What it does is that it
automatically "carves out" the inside of your cube and turns
it into 6 brushes because a single brush can never be
concave. IOW, it cannot have holes, dips, grooves or
any other kind of "inner bend" in it. Otherwise, it would
effectively be what the game engine sees as an invalid
solid.
An important thing to note about the
hollowing tool in SinEd is that it always carves inward
so the outside of your "box" will be the same size as the
original brush from which it was made. And the width, length
and height of the inside will be smaller by twice the
thickness of the walls.
So what determines how
thick the walls will be when you hollow the
brush?...
The grid setting. Right now, the grid
is set at 64 x 64 so we have to change this before we
hollow otherwise we'll end up with a very small room with
uselessly thick walls. Hit the 4 key to change the grid
to 8 x 8. |

With the brush still selected, click on the
Make hollow button on the toolbar: 
Hit the ESC key to unselect all
the brushes. |
And
our room is done. The walls, floor and ceiling are 8
units thick and the inner width, length and height of the
room is 240 x 240 x 240 since (256 - [8 x 2]) =
240.
But our map is not ready to be compiled yet. There
are 2 more things which are essential to make the map work: a
player entity and a light entity. This what
we're going to make next.
|
3. The
essential entities
|
info_player_start
Why is this necessary?
Because how will the game know where the player should
spawn in the map if you don't tell it? So to do this, you must
use the right-click context menu in the 2D view. Go back to
the XY view by hitting the Caps Lock key twice.
|

Make sure nothing in the map is
selected (whenever in doubt, press the ESC key). Place the
mouse cursor over the center of the room and do a
RightClick. The entity selection menu appears. Select
info, player, start as shown on the left. |

The player entity is inserted as seen in
image on the left. Now you have to make sure that it is placed
at the proper height in the map: at floor level. Change the 2D
view to the XZ view (Caps Lock key) zoom in and scroll
the view on the entity. |

If you look closely at the image
on the right, you will see that it's penetrating into the
floor. This is something you must never allow to
happen: all the entities must always be fully inside
the map otherwise you could get a LEAK during
compilation or it could prevent the entity from spawning and
the map won't be able to start. |

So we have to move the entity. To
do this, place the mouse cursor inside the player entity and
LeftClick-drag upwards to move it up by 8 units.
It's now completely enclosed inside the map. |
The
last step for the player start entity (as for all entities) is
to set its key/value pairs. In the case of
info_player_start, the only key you have to worry about is the
angle key. This is what determines in what direction
the player will be looking when the map starts. To set it, you
need to call up the entity properties dialog:
|

This is what you use to set or change an
entity's key/value pairs and spawnflags. To do
this, you must first select an entity and hit the N key
(N for N-tity). All of the entity's previously set keys and
spawnflags will automatically be displayed in the
dialog.
Click on the 270 angle button to
make the player face south when spawned in the map. The
nice thing about this menu is that the angle buttons
are placed in the same orientation as the resulting pointing
angle of the entity when seen from the top view.
|

The angle arrow inside the entity
points south. It is worthwhile to note that the arrow will
only be visible when the entity is set to an angle value
other than 0.
One last detail: still in the XY
view, zoom out and move the entity to the upper right corner
of the room to make things easier for the next step. When
you're done, hit ESC to unselect the entity. If you
want to select it again, do a Shift-LeftClick
over it. This is how you select brushes and entities in
SinEd BTW. |
light
Why is this necessary? Because
otherwise your map will be totally dark, you will bump into
walls and fall in a lava pool and kill yourself without having
had a chance to put up a decent fight... :). So "let there be
light!" as a very important dude with a huge cigar and a very
comfortable sofa once said.
|

Place the mouse cursor in the
center of the room in the XY view, RightClick to bring
up the entity menu and select light. |

The light entity is inserted. I might be a
little hard to distinguish at this scale because it's a bit
small. It's the one the mouse cursor points at. Now you can
see why I asked you to move the info_player_start entity
earlier.
In order to position it vertically, you'll
have to repeat the same operation as was done for the
info_player_start entity which is to switch to the XZ
view and move it up. |

Make sure the grid is set at 16
x 16: hit the 5 key. Drag the light upwards until
it's about 8 units below the ceiling. |

Next, hit N to call up the
entity dialog again and set the light key to 300. This sets
the intensity of the light emitted by the entity.
|
In
SiN, you can have colored lighting in your map. This is done
with the _color key and the value is an RGB
triplet. Each value in the triplet (0 to 1) sets the
intensity of Red, Green and Blue that gives the
resulting color. For example:
1 1 1 means 100%
of Red, 100% of Green and 100% of Blue and the result will be white light
which is the default.
0.5 0.5 0.5 means 50% of
Red, 50% of Green and 50% of Blue and the result will a medium gray
dull kind of light.
1 0 0 means 100% of Red, 0% of Green and 0% of Blue and the
result will be pure red light.
But what if you're
looking for a subtle hue of light color, figuring out the
percentage of each basic color you need can be hard to figure
out. Fortunately, SinEd has a feature that lets you pick a
color from a color selection dialog.
|

With the light entity still
selected, hit the P key. This will bring up the
standard Windows 95 type color dialog seen on the left. Just
set the color you want and hit OK.
In this
example, I went for a cool shade of aquamarine. |

And voila! The _color key and
RGB value for the light color you want is automatically
entered in the entity dialog. Now save your map as
basic.map.
At this point your map is
functionally complete and ready to compile but before we do
that, there's a few things I would like to discuss: how to use
the Camera view and how to work with Textures in
SinEd. I believe that it's essential to get familiar with
those if you want to work with SinEd and that this tutorial
would not have been complete without taking a look at those 2
important aspects. So let's move on to Part II ...
|
Part II
|