Skip to content

Steer for the landing once a bot falls past a drop - #2227

Draft
sunzenshen wants to merge 2 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-drop-goal-airborne
Draft

sunzenshen wants to merge 2 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-drop-goal-airborne

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Bots steer for the landing once they fall past a drop

What it fixes

When a bot's path walks off a ledge (a drop-down), the path follower kept the top of the drop as the
bot's goal until its feet were within a step of the landing. Once the bot had walked off, that goal
was behind it, so the bot steered back toward the edge while it fell and landed moving backward,
then turned around again. On a run of ledges this reads as bots circling back after every drop.

The change

In PathFollower (NextBotPathFollow.cpp):

  • IsAtGoal: a drop-down goal is reached once the bot is airborne and past the top of the drop,
    along the direction it approached the top from.
  • Update: when that happens mid-air, the landing segment is skipped as well. It lies straight below
    the top of the drop, so it is just as much behind the bot; the bot heads for the next point on the
    path instead.
  • Update, on touchdown: a bot that skipped the landing can come down on a ledge part way down the
    drop instead (a rim inside a shaft, say), where its goal is now below it and nothing acts until the
    stuck monitor fires about 5 s later. When it lands more than a step above the landing and more than
    a step below the top, its goal goes back to the top of the drop.

Nothing changes for a bot that has not walked off a drop, and it only acts on drops the path already
planned.

Testing

Debug build, headless bot matches, 12 bots.

  • Test map with a corridor of 41 ledges to climb and drop off (1259 drops in 3 matches): drops that
    landed with the bot moving backward went from 62% to 4%; median walk-back after a drop from
    20-25 u to 0.
  • One round on every ghost spawn of ntre_skyline_ctg, ntre_ballistrade_ctg and ntre_rise_ctg
    (21 matches), against the same sweep without the change: no asserts, fall deaths 6 -> 2, deaths in
    mid-jump 2 -> 0, stuck after a jump 24 -> 21, round outcomes unchanged.

With the touchdown restore added (Release for the test map, Debug for the matches):

Merge order

This should merge after #2201, which handles a bot standing on a ledge part way down a drop; without
it, narrow shafts like the vent above get worse than master. Merging it next to #2214 gives a textual
conflict in PathFollower::Update: keep this PR's touchdown restore block first, then #2214's check.

A bot that walks off a drop-down kept the top of the drop as its goal
until its feet were a step above the landing, so it steered back toward
the edge behind it while falling and landed moving backward, then
walked back to rejoin its path.

Count the drop as reached once the bot is airborne past its top, and
skip the landing point too, since it lies straight below the top and
is also behind a falling bot.
@sunzenshen sunzenshen added the Bots Related to bot players label Oct 15, 2026
A bot that skipped a drop's landing in the air steers for the path past
the landing, which on some drops (the ghostzc vent shaft) carries it
onto a ledge part way down. There the goal is below it, and nothing
acts until the stuck monitor fires about 5 s later.

On touchdown more than a step above the landing and more than a step
below the drop's top, set the goal back to the drop's top.
@sunzenshen

Copy link
Copy Markdown
Contributor Author

Jumplab map for testing:

dev_dbg_jumplab_vr_ctg.zip

Original behavior where bots move backwards that prompted this PR:

jumplab_vr_side.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant