|
|||
|
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) |