Waypointing Ladders

From Bots-United Wiki

Jump to: navigation, search

This FritzBot Topic is still under some construction.

Contents

[hide]

Ladder Basics

  • How many waypointers does it take for a bot to climb a ladder...#*

Why do we need to waypoint ladders differently?

While Bots just like humans players automatically move differently when attached to a ladder versus on the ground, for the bots to use the ladders effectively they need to know that they are at a ladder node. In FritzBot this information is conveyed by one or more nodes' flags. The bots seeing those nodes as the next point in their path then behave differently so as to mount and use the ladders correctly.

Node flags

There are two node flag values that are used in waypointing ladders. The ladder bottom node_flag value is 2 and is used on just about all ladders. The ladder top node_flag value is 1 and should only be used in certain circumstances (more on that later).

Node flags are typically set with the console command /node_flag <node_id> <node_flag>. But they can also be set as an extra parameter in /node_add or they can be changed using Hobbit's waypoint editor.

The bottom node is typically placed at the very bottom of the ladder at the point that the ladder hint appears not at the point that the player is actually attached to the ladder. However there are exceptions to that rule of thumb. The bot may have to jump on a ladder from a middle ledge, or a ladder may take longer than the bots 2.5 seconds timeout. Now a ladder that is say 4 seconds long can have its bottom node on the ladder a seconds or so above the bottom rung. The bot will jump and become attached to the ladder as it tries to get to the bottom node (See example in Denny's tutorial). A ladder that is longer still may need a node in the middle of the ladder in which case the bottom node may be placed normally (see #Do_The_Twist).

Long ladders typically also need top ladder nodes for the bots that are going down the ladder. The top ladder node tells the bot to walk from the 'approach' node so that the bot momentum won't take it over the edge, and so the bot doesn't do the scary edge bounceback.

Ladder Approach Vector

Just like in real life Bots should follow the 3 point rule. You should always have 3 points of contact (hands and feet) on a ladder at all times. NEVER CLIMB A LADDER FROM ONE SIDE. Well bots should do the same. It makes them look human, they fall off the ladder much less, and they don't get stuck clipping the edge of something like a restricted opening.

Now to ensure they don't accidentally grab a ladder from the side it is important to lead them to the ladder dead center. Also avoid pathing behind a ladder that is accessible on both sides, the bot might accidentally jump (e.g. fight) and get stuck to the back of the ladder.

(Question to resolve: should a single node be placed behind so the bot will jump that way after timing out?)
TO DO say 2 pictures one good approach one bad...

Here is a case with a narrow ledge and a ladder. Note how even with only limited space the up direction (370->369->367) still approaches the ladder head-on to avoid side trapping of bots.

Image:mmlchurch_trickyladderbottom2.jpg

TO DO ADD ANOTHER VIEW ANGLE

Front and CENTER!

Did you know November is Ladder Safety Month? (Human logic=>Month with most accidents=Safety!)

Falling from a ladder in real life is often a result of reaching over to one side and losing your balance. Well for bots there are also other reasons to keep them well centered on the ladder. Any nodes on the ladder especially those for mounting it (up or down) should be dead-center. That way a bot that gets pushed to one side will try to re-center himself on the ladder.

Size Does Matter

To encourage bots to remain centered and to get them through an restrictive opening it is important that the radii of any nodes on a ladder are less than the width of the ladder. That way a bot will not satisfy the next node condition of its navigation by staying stuck to the ladder side. Rather the bot will have no choice but to attempt to move to the ladder center if it can.

Do The Twist

(or Stairway To Heaven)

A common problem is you have finished your waypointing and find the bots use the ladder but rotate as they do maybe even falling back down. This is The Twist.

To fix a twist, it is best to first understand how bots use nodes. When a bot's position is within the radius of the next node in its choosen path, it immediately computes the direction to go to the center of its future next-node. But in a ladder situation what happens if the next node has exactly the same x and y coordinates? Well the bot moves in the Z-axis direction (Up/Down) but lacks a specific hint as to what direction in the X-axis and Y-axis he should point to. Consequently the bot may randomly change its x-y angle resulting in a random twisting motion. The motion looks distinctly unnatural and in bad cases the bot may slide back down the ladder bottlenecking other bots.

The Dismount

Actual newspaper headline from years ago "Teenage Prostitution Problem Is Mounting" #1;)

For many ladders this is not too much of a problem...

Ladder Type: Straight Over The Top

These are the simplest of ladder to climb up and off. The bot just takes a straight path up, over the lip of the opening or floor and is back on level ground. No turning needed. The top node doesn't need to be on the ladder at all.

Example: Goldrush Ladder Near tank bridge;

Image:goldrush_ladder.JPG

Note the up path nodes (250-251) are near to but not on the ladder. Only the down path (369) has a node actually on the ladder.


In the following open field example from Battery, note that the node radii are not critical but the nodes and approach are still centered (112-113);

Image:battery_simple_ladder_radii.JPG

Ladder Type: Top Rung Side Dismount

In this case the ladder sticks out from the wall and you can stand on the top rung, but you then need to turn to dismount. Not much of a problem, you just need a node beside the ladder's top rung for the bot to dismount to.

Example: Dm_hillb2 CP room Ladder;

Image:dm_hillb2_ladder.JPGImage:dm_hillb2_ladder_radii.JPG


But then again for some ladders dismounting is a pain! a bot-deadly PAIN!...

Ladder Type: Flush (Them Down, no place to turn)

These are some of the worst ladders to deal with. The ladder is just flush with the wall and runs floor to ceiling (or thereabouts). The bot can't go over the top since the opening if any is in the middle, behind or 90 degrees to the side. So when the bot turns to face the first node that is off the ladder completely it may turn 90 or more degrees and (like Wiley Coyote in a Roadrunner Cartoon), fall down injured, another bot above or below him bottlenecking the game...

The problem is that the bots don't side step in navigation. Human player quickly learn to side step difficult dismounts. But the bot turns and loses his grasp of the ladder.

So the key to solving this case is to make the first node off the ladder be less than 90 degrees turn from the last node on the ladder. This may not be possible in ordinary walking about the map, but if you are editing the waypoints in /devmap (which you should be), you can use the /noclip cheat. This allows you to fly inside the wall just a little bit so that the node is very slightly pressed into the wall that the ladder is flush with. But don't over do it, the center of the node should not be inside the wall!

Here is an example from MML_Church_et_v1 (from church sewers in side room); Image:mmlchurch_trickyladderside.jpg

Image:mmlchurch_trickyladdertop.jpg

Note that in the example above the node that appears to be 37 (it is actually 375 the 5 is embedded in the wall) is further in to the wall than the ladders top node. This permits the bot to dismount without falling because it will turn slightly less than 90 degrees when dismounting, sliding along the wall until it touches the edge of node 375. As long as the radius of node 375 does not go over the ladder opening the bot is safe (whereas the other dismount 312-48 could be a problem).

Ladder Type: Inset (Impossible)

This case is even worse. The point where the dismount needs to happen, the ladder is inset from the rest of the wall. A human learns to side step until he can catch a very narrow edge of something, then twist and jump to where he wants to go. The bot, as in the flush case, will turn first and then move, so the node it must aim for is going to have to be in the wall or around a corner and the bot will scrape and slide along the wall to get at the node, aiming as always for its center. This is a case where testing with a special nav (single path between 2 roam actions) or using test spawns can be helpful.

Example: Ammodepot ladder to bunker entrance wire thingy Image:Ammodepotladder.jpg

In this test nav file the bot is aiming to follow the connection from #23 that passes through the wall to the node #24 around the corner. If the opening was not there the node would be embedded in the wall. Note that the bot is shown climbing up from the narrow ledge below the opening in the floor.

One way thinking

Actually unlike most of the waypointing you do, ladders are one place where the node connections should be at least considered for one-way connections. Making the bots climb down a short ladder with 2-way node connections is inviting a bottleneck should they meet a bot going the other way. And for what? they likely could have jumped down faster with little falling damage.

Bots Go Ballistic

Bots by default run unless a node flags tells them otherwise. So if a waypoint node does not need a ladder flag remember that for the bot to hit it right it should be placed where their momentum will take them. Now if an approach node has them walking (or not) that will affect their speed so repeat testing is very important to good ladder work.

Descent (Into Madness?)

Getting the bots down the ladders quickly often requires some innovative work. One problem you may notice with bots is a behavior of jumping back if they approach an edge at a certain angle. If you get the path going down wrong they will repeat the behavior which in situations like an MG tower may get them stuck bouncing back and forth. However typical MG tower ladders have a cage at the top of the ladder that we can use to good effect.

Consider Fueldump's tunnel MG42 tower as an example;

Image:fueldump_MGtower.jpgImage:fueldump_MGtower_Radii.jpg

Note the node 865. It is not flagged as a ladder top node and no Bot will ever be able to reach its center, but then they don't have to. The bot navigating the way down will run towards the node 865's center, hit the cage, touch the node's outer radius and fall twisting to face the ladder. And as long as the bot did touch the edge of node 865 then it will not be delayed when it gets to the bottom. In this case the fall damage is not great and if it touches the ladder on the way down, then maybe no fall damage occurs. Should the ladder be a lot longer a small adjustment can be made to ensure the bot will touch the ladder on the way down (with a small risk he will meet a bot going in the other direction).

Example from et_tundra_beta4a
Image:et_tundra_beta4a_ladder_radii.JPG


Hill Slopes and Jumps

Not really a ladder topic, but worth mentioning. The bot ballistics that we had to allow for and even exploit in ladders you will also encounter when pathing down hill slopes, over small knolls, and on jump pads or bot cannons. In all of these cases the placement of the nodes need to be;

  • Close enough together that the bot does not time out,
  • Centered to direct the bots navigation direction, and...
  • Have large enough /node_radius settings to catch walking, running and flying bots whose momentum may carry them past a node in mid-air.


Happy Waypointing!



#*Two. Didn't your parents tell you not to do a ladder alone?

Sources

Retrieved from "Waypointing_Ladders"