Warning: include(/home/brian/www/serious/ssi/ad_code.ssi) [function.include]: failed to open stream: No such file or directory in /home/massassi/public_html/serious/ssi/display.phtml on line 169
Warning: include() [function.include]: Failed opening '/home/brian/www/serious/ssi/ad_code.ssi' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/massassi/public_html/serious/ssi/display.phtml on line 169
|
Serious Editing: Basic Gravity
|
|
A feature very much unique to the Serious
Sam engine is its ability to handle multiple gravity's. Not only can it handle
them, but gravity can be changed on the spot. This tutorial will cover basic
gravity by using gravity markers.
Before attempting this tutorial, you should
be reasonably familiar with the editor, and be able to place entities and create
basic geometry.
To start off, make a new level and place
a conus primitive in the center, with dimensions 128x128x128, room flag checked.
Now create a sphere primitive, dimensions 16x16x16, 12 meridians, 12 parallels.
Place the CSG in the center of your box, and add it to a SEPARATE layer using
[L]. Now open your browser to basic entities, and drag a player start on top
of the sphere. Here's what I've got so far:

If you were to test your game
right now, you'd start on the sphere, and just walk off it and fall to the ground.
But say we wanted to walk around the sphere...
Now open basic entities in your browser
again, and drag a gravity marker onto the world. Place it inside the sphere,
and look at the properties section.

Here's the explanation, as
far as I can tell:
| Property |
What it does |
| FallOff |
How far the player can go from the
marker before it loses its effect |
| Hotspot |
The hotspot of gravity |
| Name |
The name of the entity |
| Parent |
The parent of the entity, makes it
move and stuff if the parent moves |
| Spawn Flags |
I STILL don't know how to use these,
or even what they do. |
| Strength |
The strength of the gravity. The smaller
the number, the weaker the gravity. Also note that negative numbers will
reverse the gravity, causing a repel effect |
| Target |
The target of the gravity. I cant
see what this could be used for... |
| Torus Radius |
I have no idea what this is. |
| Type |
Very important. Describes the type
of gravity: central, cylindrical, parallel, or torus. I'm not sure what
the torus mode does, but the others will be explained later. |
Set the type property to central,
and set the falloff to 18, then set the strength to 1. Our marker is all set
up, but nothing is being told to use it. Select the main worldbase entity, and
go into the properties section. Select gravity0 and change it to Gravity Marker.
Now go into sectors mode ( [s] ) and select the main sector. Hit [q] to invoke
the properties dialog, then select Gravity Marker from the force property dropdown,
like so:

Now you can go ahead and test
your level, and you will be able to walk on the sphere, on all sides of it.
But there are more things we can do with gravity markers. Create a new conus
primitive, 16w x 128h x 16l, 16 base vertices, and place it so it lines up with
the sphere. In case this is not clear:

Add it to the world in its
own layer, with [L]. Now use [esc]
in the 3d window, or a different navigational method, to get you camera inside
the solid geometry and viewing the gravity marker, and click on it in entities
mode. Please note that by pressing [n], we can invoke a list of all entities,
and simply double click on the marker from that list. Once the marker is selected,
go into the properties section and change its type to cylindrical. Now use [LMB]
+ [RMB] + [CRTL] on the marker, so that the markers arrow lines up with the
cylinder, like so:

Now start up the game with
[t] and play it. Now we can walk about the cylinder and go around it as well.
You can probably guess what the parallel type does, so I wont go into that.
Remember that gravity markers can have negative strength, and create a repelling
force.
I cant wait to see what creative
uses this multiple gravity feature will bring about. If you want to look at
some more examples, open up your browser, select the tutorials list, and open
the MEH tutorials.
-oSiRiS
|