Skip to content

Keep crawl spaces pathable after the round-start blocked-area test - #2236

Draft
sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:nav-blocked-test-crouch-hull
Draft

sunzenshen wants to merge 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:nav-blocked-test-crouch-hull

Conversation

@sunzenshen

Copy link
Copy Markdown
Contributor

Description

One second after every round start, the nav mesh tests every area for "blocked" (CNavMesh::TestAllAreasForBlockedStatus -> CNavArea::UpdateBlocked( true )): it puts a box at the area's center from 35.5 u above the floor up to the top of the base duck hull (59 u), and if the box starts in solid, the area is marked blocked for the rest of the round. The test is meant for doors and other movers that close over an area. A crawl space whose ceiling is lower than 59 u fails it as well, although a crouched Recon (46 u) or Assault (48 u) fits through, so bots stop pathing through every such area from one second into the round. Paths planned before that second still use it, which is why bots are sometimes seen going through.

ntre_rise_ctg ladder 4 (355, 376): its top is a 48 u hatch onto the cap area 3589, the only way off the ladder. With harness logging of the forced test, area 3589 is the one area on the map it marks blocked (at round start + 1 s, hit worldspawn). Every path a bot plans after that avoids ladder 4: when its foot's vent cover breaks (#2231), all the bots that were clearing it re-plan, and every one of those re-plans went round another way (17 of 17 in the A/B below), while the paths planned before the first second of the round had gone up ladder 4.

What this PR does

nav_area.cpp only, under #ifdef NEO: the blocked test's box now reaches the top of the smallest player hull, a crouched Recon (base duck hull + NEO_RECON_DUCK_MAXHULL_OFFSET, 46 u), instead of the base duck hull. An area that a crouched Recon fits into is not blocked; a door or mover that closes over an area still fills the box and still blocks it.

How to test

  1. map ntre_rise_ctg, sv_cheats 1, developer 1, nav_update_blocked (runs the same forced test on every area).
  2. Without this PR the console lists Area #3589 ... is blocked (ladder 4's top); with it, no area is listed.
  3. With neo_bot_quota 12, bots whose path to the ghost room's upper floor runs up ladder 4 keep that path after the first second of the round.

Risk

  • Areas under a 46-59 u ceiling are now pathable for every class, as they were before the first second of each round. Assault (48 u) and Support (59 u) do not fit under a ceiling lower than their crouched hull; that was already true for paths planned at round start, and the path follower's stuck handling covers it.

Results

Linux dedicated servers, Release builds of upstream master (at #2203) plus #2231 and #2232 (the two rise ladder PRs) with test-only logging (kills, stuck events, ladder ends, the areas the round-start test blocks, round and match end), without and with this change; the Debug build for the assert check is the same with this change. Every match below reached match end with 0 asserts and a clean exit. XP held at one rank tier per match, rotated across matches.

Which areas the round-start test blocks, 22 maps with ladders, one match per ghost / juggernaut spawn (DM / TDM one match), 172 matches an arm, 30 bots, default damage 1.485, interleaved 8 wide:

map blocked without blocked with
ntre_dawn_ctg, ntre_dusk_ctg 3901, 4441 (a crouch corridor) -
ntre_rise_ctg 3589 (ladder 4's top) -
ntre_skyline_ctg 2143, 2197, 2313 -
ntre_disengage_ctg 12519 12519
ntre_ghost_ctg 1227, 4915 1227, 4915
ntre_sentinel_jgr 1861 1861
ntre_threadplate_ctg 3025 3025
ntre_vtol_ctg 4895, 44698-44700 4895, 44698-44700

Every one of these is blocked by the world (worldspawn), in every match. The areas still blocked with the change have less than 46 u of headroom at their center, so no player fits there either way. (In a separate 81-match run, ntre_rogue_ctg area 4030 was blocked once by its tank train: movers still block.)

Same matches, totals without -> with: kills 5789 -> 5771, rounds won by a ghost capture 12 -> 11, ladder climbs completed up 1017 -> 975, down 153 -> 131, stuck episodes (a bot stuck in one 150 u cell, counted once a match) 2027 -> 2054; on the four maps that changed, 290 -> 286. Near the unblocked areas (150 u): ntre_dawn_ctg / ntre_dusk_ctg's crouch corridor had short stuck events in both builds (3 bots without, 5 with, at most 2 s each); on ntre_skyline_ctg one bot spent 4 s at the edge of 2197, a 17x25 u area 51 u below its neighbor that no bot could path to before. One match a spawn, so per-map counts vary run to run by more than these differences.

ntre_rise_ctg ladder 4 (navmesh as in NeotokyoRebuild/neoAssets#160), 12 bots, Recons only, the attacking team spawned below ladder 4's vent, the ghost pinned past its top, low damage, 4 matches an arm, both builds with #2231 (so the vent breaks):

without with
bots that mounted ladder 4 5 24
ladder 4 climbs completed, up / down 6 / 0 30 / 7
re-plans when the vent breaks that keep the ladder 4 route 0 of 17 15 of 15

Debug build: 10 matches (one 30-bot match each on ntre_dawn_ctg, ntre_dusk_ctg, ntre_rise_ctg, ntre_skyline_ctg, ntre_ghost_ctg, ntre_vtol_ctg, ntre_threadplate_ctg, ntre_terminal_jgr, and two ladder 4 runs as above, 28 ladder 4 climbs completed): 10 of 10 at match end, 0 asserts.

Not run: a Windows build.

Toolchain

  • Linux GCC Distro Native (Linux Mint 22.3, GCC 13.3.0)

Linked Issues

CNavArea::UpdateBlocked probes an area's center with the base duck hull
(59 u). Run 1 s after every round start, it marks blocked for the
whole round any area whose ceiling is lower than that, so bots stop
pathing through crawl spaces a crouched Recon (46 u) or Assault (48 u)
fits through. On ntre_rise_ctg this removes ladder 4's top cap 3589 from
every path planned after the first second of a round.

Probe with the crouched Recon hull, the smallest player hull, instead.
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