Tutorial originally posted to Massassi.net. Mirrored here for archival purposes.
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:
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.