Gary L. Simmons  rev 11/06/03  http://webwonks.org/Marathon/Forge/hastursworkshop/things2.html
Litterbox  Forge Tips  Hastur's Workshop



The Battle Cat's Litterbox

Monsters in Marathon are everywhere! How they work, however, is not so obvious. This page is dedicated to helping everyone understand how they work, so when you make maps you'll be able to get the monsters to behave correctly. Specifically, we'll discuss path building. That is, how the monsters decide what path to take when they're running around.



Path building in the Marathon engine is simple. Monsters build paths when they get activated, when they switch targets, or when their path becomes obsolete (due to the target moving to a new polygon).

The paths are built between the midpoints of passable sides. Take a quick look at the diagram to the left to see what possible monster paths could be used in a section of By Committee. In other words, when a monster builds a path, he looks at all the passable sides of the polygon that he's in. Then the builds the shortest path to his target through the midpoints of all the polygons that he'll have to traverse. The shortest path is the path that traverses the fewest polygons, not the path that will take the least time. A passable side, is a transparent side that the monster can cross: the side has to be wide enough and the elevation change must be within the monster's parameters (see the notes at the bottom of the page for more information.)

The paths in Red can be used by both walking and flying creatures. The paths usable by flying creatures only are in Blue. (Note that a walking creature can jump off an elevation - the height a monster is willing to jump from is set in the monster's physics model.) In the example, some of the blue paths could be used by walking creatures jumping down.



When building your maps, you'll want to keep in mind how the monsters are going to build paths. The example on the right illustrates a very common problem. In this example, if a monster builds a path along the dotted red line, it will appear to be halfway inside the wall.

There is another good reason to avoid having "transparent-solid-transparent" walls all in a line. The player can bounce when entering one wall. Basically, as a rule of thumb, never do BAD things. Always do GOOD things. Look at the diagram and memorize it: avoid the BAD, love the GOOD.

It's true that the BAD method uses fewer polygons. Don't worry about it. Don't be afraid to cut up your polygons.



Other things to keep in mind while we're on the topic:

1. Much of the "dodging" that monsters do in Marathon is due to the fact that they build paths along the midpoints of transparent sides. If you want your monsters to dodge, give them some polygons that have sides that aren't all at 90 degree angles. (this usually happens by itself)

2. If you want to have monsters that jump down from great heights, modify their "Min Ledge Jump" in Anvil.

3. If you want to have monsters that can get up great heights, modify their "Max Ledge Jump" in Anvil.

4. If you have a narrow ledge, and the monsters aren't building paths to it, it could be that the ledge is too narrow. In the physics model, the monsters have a "radius". For example, a fighter has a radius of 204, a diameter of 408. A world Unit in forge is 1024. This is about .4 world units. If the fighter is to build a path through a transparent side, the side must have a width of at least .4 World Units. (The player radius allows a minimum of .5 W.U.).
Decreasing the radius of the monster would allow it to pass narrower sides, but it would also make it harder to shoot because it would occupy less space in the Marathon world.




 

 

Back to the Litterbox