Skip to content

ntre_rogue_ctg: navmesh rework - #158

Merged
sunzenshen merged 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:navmesh-rogue-release
Oct 14, 2026
Merged

sunzenshen merged 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:navmesh-rogue-release

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

ntre_rogue_ctg: navmesh rework

One file, neo/maps/nav/ntre_rogue_ctg.nav. It starts from master's mesh (#131) and keeps its hand edits.

Dependencies and status

Needs: none. Measured on neo master 092203f36 with no open PR (A/B below). The bot change this mesh carries data for is in master:

The mesh has no NAV_MESH_AVOID marks, so NeotokyoRebuild/neo#2170 (merged) has no data here. NAV_MESH_PRECISE and NAV_MESH_CLIFF are stock Source nav attributes.

Not waited on: NeotokyoRebuild/neo#2179 ("Bots avoid neo_npc_targetsystem via nav PVS", draft), a bot change for the casual-mode tank. The tank-on numbers below are measured without it.

At a glance

master this PR
nav areas 1289 1008
file size 564,486 bytes 381,464 bytes (-32 %)
areas no spawn or objective can reach 32 (14 pockets) 4 (2 pockets, see below)
areas blocked at round start, offline, counting the competitive-mode props 35 10, all under those props
nav ladders 4 5, all connected both ways
areas marked PRECISE + CLIFF (fall edges) 0 7
bot movement failures a match (stuck, fell off the path, no path), tank removed (see "The tank") 18.1 11.6
the same, with the tank (casual mode as shipped) 23.4 15.2
the same, competitive mode 40.5 28.0
canal deaths a match, tank removed 1.44 0.16
the same, with the tank 1.43 0.16
the same, competitive mode 1.46 0.32

All on neo master 092203f36, 61 / 61 / 41 matches a mesh; intervals under "How it was tested".

What changed

  • Sliver areas merged into their neighbors on the same floor.
  • Unreachable floor removed. Of master's 32 areas no spawn or objective reaches, 28 are removed: six islands with no link to the rest of the mesh (16 areas), and pockets on the boat and on ledges whose climb back is higher than any class plans (12 areas; no bot stood on them in 102 test matches). Kept, as master has them: the boat's top near (-450, 2010) (3 areas) and a ledge near (-1562, 62), which bots leave by drops.
  • The north canal walkway is a boat's gunwale over the water: an 8 u rail at z -7, with a lip over the water on one side and the boat's deck on the other, both 40 u below. Its areas 3929-3932, 4055, 4056 and the deck strip 4257 are PRECISE + CLIFF (see "The canal").
  • Ladder 6 is new, on the ladder brush near (624, -790) that master has no nav ladder on.
  • Ladder 2 near (-447, 292): its top is lowered from z 223 to 200 (at 223, climbing bots hung under the ceiling), and it no longer lists 4066 behind it, which did not link back.
  • Drops with no clear column are cut, one way: ladder 2's tops onto its foot (4068 -> 4237, 4068 -> 4239, 4069 -> 4239, 4066 -> 4233), whose drop points land on the z 168 floor itself, and 789 -> 2063, a 78.5 u drop past a door trim. Bots pressed into those spots. The tops keep ladder 2, 4066 and 4069 keep their drops to 4237, and 789 keeps its drops to 2066 and 2069.
  • Engine hull audit rows resolved (a player hull swept across every link and stood on every area, in the server): links blocked both ways are cut (123 <-> 1404, 1447 <-> 3401, 2975 <-> 2976, and the 5 u corner portal 3703 <-> 4237), and areas no hull fits in are removed (3917, 3920, 4302, 4268, and dead-end pockets no hull enters, one behind a static glass door).
  • The plaza's south side. The strip south of the plaza is split again at x -350 as on master (3636 / 3637), and the plaza's east edge by 378 gets a strip in three pieces (4360-4362) that routes bots round the building corner instead of along the wall.
  • The water pump's obstacle tops (4304, 4307) follow the prop's height.
  • Id alignment with master: 996 of the 1008 areas and 4 of the 5 ladders carry master's ids (areas matched only within 64 u of height), so an id-keyed diff against master reads sensibly.
  • Re-analyzed in game after the edits, so the visibility lists bots use for what they can see are current.

The canal

The canal under the boat is two trigger_waterydeath volumes. Bots walking the gunwale slipped off its water side, mostly while aiming or strafing. On master, with the tank removed, 1.44 bots a match died there, most often off 3931. The PRECISE + CLIFF marks keep bots on their path there: no combat dodge, no close-range strafe, no stepping away from a teammate (NeotokyoRebuild/neo#2168). An unmarked research mesh with the same walkway ran at 1.22 deaths a match (50 matches, research build).

  • tank removed: 1.44 -> 0.16 a match (paired x0.49, 95 % interval [0.44, 0.55], 48 matches down, 0 up; rare counts read compressed towards 1)
  • with the tank: 1.43 -> 0.16; competitive mode: 1.46 -> 0.32
  • stuck events on the walkway and its gangway (3930, 3931, 55) stay near master's: 1.16 -> 1.03 a match tank removed, 0.92 -> 1.44 with the tank, 1.28 -> 0.74 in competitive mode. Bots that used to fall off now stay on the rail

The tank

In casual mode the map runs a scripted tank (tank_train) on a loop round the roads. Its turret took 15 % of the kills in 8 test matches, and its gates' func_nav_blockers block the strips at each gate while the gates are shut. The mesh links across no gate, as master. Competitive mode (sv_neo_comp 1) removes the tank and spawns props near the middle instead: a container, an APC, crates and fences.

The main comparison removes the tank at every round start (ent_remove_all tank_train from the server console, the same removal competitive mode makes), so stuck counts measure the mesh rather than where the tank happened to be. Two more arms ran the map with the tank, as shipped, and in competitive mode.

With the tank, bots on this mesh died to it 3.30 times a match against 2.67 on master (x1.16 [1.00, 1.34]); NeotokyoRebuild/neo#2179 (draft, not in these runs) is the bot change for the tank.

How it was tested

  • Reachability:
    • every spawn reaches every other spawn; every objective is reachable
    • no trap, no dead end, no one-way link between areas at the same height, no climb without its drop back
    • 4 areas no spawn or objective reaches (master 32): the boat top and the ledge kept under "What changed"
    • one area, 1067 near (-538, -462, 95), is reached only by a 78 u climb no class plans, as on master
    • the ghost spawn on the tech cart: see "Known, not changed"
    • the 10 areas the offline check predicts blocked at round start all lie under the competitive-mode props (the container, the APC and the 64 u fence), which casual mode does not spawn; the props are not carved, since the floor under them is walkable in casual mode
  • Engine hull audit, tank removed: no pair of areas at the same height blocked both ways by a wall or static prop (master 15), no area too cramped to stand in (master 20), no link blocked one way only. 5 pairs read blocked on some lanes, all as on master. In competitive mode the extra rows are the props above.
  • Link walker (a bot of each class placed at one end of a link and sent across): every link the edits touched, 5 times per class, and the whole mesh once per class. No new reliably failing link (4 or more of 5). With the links in place, the cut drops failed (ladder 2's 4068 -> 4239 stuck 4-5 of 5 for each class; 789 -> 2063 fell 2-3 of 5 for Assault and Support).
  • Falls. The map's lethal volumes are the two trigger_waterydeath boxes under the canal (z -192 to -112). The edges bots fell from are the walkway's, now marked. The tank's trigger_hurts ride the tank and are crush damage, not falls.
  • Master against this mesh, neo master. Byte-identical copies of the map, one carrying each .nav, run back to back. Upstream neo master 092203f36 with no open PR, Release build plus the harness's logging. CTG, 1 round, the ghost pinned at each of the 5 ghost spawns in turn, every player's XP rank held at one tier a match and rotated over the spawns, 30 bots, default weapon damage, 8 matches at a time, paired by (ghost spawn, repeat). Every match reached match end with 0 asserts (406 matches, the variants below included). Stuck = OnStuck plus FAIL_STUCK move failures, excluding the spawn crush at round start and the weapon-scavenging behavior; movement failures = stuck + "fell off the path" + FAIL_NO_PATH_EXISTS.
a match (master -> this PR, paired [95 %]) tank removed, 61 pairs with the tank, 61 pairs competitive, 41 pairs
movement failures 18.1 -> 11.6 (x0.63 [0.51, 0.79]) 23.4 -> 15.2 (x0.64 [0.52, 0.81]) 40.5 -> 28.0 (x0.63 [0.47, 0.82])
stuck 10.5 -> 8.3 (x0.81 [0.62, 1.07]) 10.9 -> 8.5 (x0.79 [0.60, 1.05]) 31.6 -> 21.1 (x0.61 [0.42, 0.85])
stuck episodes (one bot, events < 10 s apart) 2.69 -> 2.00 (x0.84 [0.72, 0.99]) 2.90 -> 2.61 (x0.92 [0.76, 1.10]) 6.00 -> 4.10 (x0.68 [0.56, 0.82])
fell off the path 5.30 -> 1.72 6.77 -> 2.02 4.71 -> 3.80
FAIL_NO_PATH_EXISTS 2.33 -> 1.57 5.77 -> 4.74 4.17 -> 3.17
canal deaths 1.44 -> 0.16 1.43 -> 0.16 1.46 -> 0.32
kills 25.0 -> 24.4 24.5 -> 24.9 24.3 -> 24.9
  • At the spots, a match within 128 u, master -> this PR, tank removed / with the tank / competitive:
    • ladder 2's tops: 1.08 -> 0.75 / 1.44 -> 0.64 / 0.61 -> 0.56; its foot: see "Known, not changed"
    • the 789 -> 2063 drop: 0.69 -> 0.16 / 0.66 -> 0.18 / 0.73 -> 0.29
    • the canal walkway (falls off it): 0.87 -> 0.07 / 1.08 -> 0.16 / 0.88 -> 0.17
    • the building corner by 378: 0 on both meshes in every mode
    • the plaza (25, 754): 0.31 -> 0.41 / 0.33 -> 0.25 / 0.73 -> 0.27; see "Known, not changed"
  • Earlier numbers, research build (NeotokyoRebuild/neo master of early October plus the open bot PRs of the time and further research bot changes, CTG 2 rounds of 3 minutes; 1,122 matches with the rejected variants, 0 asserts). Stuck events a match: tank removed 19.3 -> 6.3 (x0.29 [0.21, 0.40], 50 pairs), with the tank 38.1 -> 16.9 (x0.44 [0.30, 0.61], 30 pairs), competitive 42.1 -> 39.2 (x0.90 [0.71, 1.16], 30 pairs); canal deaths 0.70 -> 0.16 tank removed, 1.50 -> 0.40 with the tank. Ladder 2 (tops, foot and shaft) 6.00 -> 2.84; the 789 -> 2063 drop 1.16 -> 0.20; the building corner by 378 0.44 -> 0.12; the plaza 1.18 -> 1.22.

How the pinned-ghost probes work

The offline checks show that the mesh links an area to a spawn. They do not show that a bot will walk there. To test one spot in game, the ghost is placed on it and bots are sent to get it: a harness-only neo patch, not part of this PR or any neo PR, adds sv_neo_ghost_spawn_pos "x y z". Master's mesh runs beside this one on a byte-identical copy of the .bsp under a second name.

On this map (an earlier revision with the same ladders), one match a probe, 12 bots, a tenth of weapon damage, on two builds: ladder 6's top (3985) was reached on both runs on this mesh (30 s and 43 s) and never on master, which has no ladder there. Ladder 2's four ends were reached on both meshes in 22-31 s.

Known, not changed

  • Ladder 2. Bots climbing from the foot (4237) press the ladder brush's nodraw face, and the drop 4069 -> 4237 fails now and then (the link walker crosses it 3 to 5 of 5 times per class from one walk to the next). At the foot, on neo master: 0.13 -> 0.36 a match tank removed, 0.36 -> 0.36 with the tank, 0.12 -> 0.46 competitive, mostly ghost carriers. That is ladder and drop code, not the mesh; the mesh variants below did worse.

  • The crouch gap south of 122 near (-490, 1262): bots walk into the low gap standing and stick against the ceiling before they crouch, then go through (the same move on both meshes). 1.11 -> 1.75 stuck events a match tank removed (24 v 34 of 61 matches), 1.07 -> 1.77 with the tank, 1.39 -> 1.32 competitive. This mesh merges master's pieces there (3542 + 3543, 3290 + 3291, and the curb strip 3532-3540); a copy with those pieces restored as master's ran at 1.70 a match against 1.78 for this mesh and 1.48 for master's in the same batches, so the pieces are not the cause. More bots cross the gap on this mesh in some batches (0.50 v 0.25 crossings a match), which no single area explains. Ducking before a CROUCH area is bot movement code.

  • The plaza by the vehicle barrier (754, 25): 0.3 to 0.4 stuck events a match against the barrier and the gutter, as on master.

  • The ghost spawn on the tech cart near (-1184, -136, 50). The ghost rests on a techcart1 prop (top z 50.4) and the mesh reaches it by a 50.2 u climb, over the Assault's and the Support's planning limits (48 and 43 u), as on master. A nav edit cannot fix it: the rise from the floor is 45.9 u, higher than an Assault or Support jump reaches (45.2 u), so letting them plan it would plan a climb they cannot make. Bots take the ghost from the floor beside the cart: first pickups there in the tank-removed baseline (an earlier revision on the research build; the cart and its climb are unchanged) were Recon 20, Assault 1, Support 1 (master: Recon 18, Assault 2).

  • The competitive-mode props are not carved (above). Most of that mode's stuck events are at the APC near (232, -118), on areas the two meshes share: 10.4 -> 10.9 a match.

  • The tank gates. Competitive mode opens half of gate b near (320, 448); neither mesh links through it.

Approaches tried and dropped (research build)

  • Moving the gangway's landing onto the rail (3930 extended north, 3931 raised to the rail's height, so the planned line keeps the rail under the hull): canal deaths 2.96 a match against 0.26, with walkway traffic up about 12 times. Raised, 3931 sees half as many areas, which halves its exposure cost in the bot path cost; which routes took the extra traffic was not established. On this mesh the walkway's traffic, not its shape, sets the falls.
  • Splitting ladder 2's foot so 4069's drop lands clear of the shaft's lip: ladder 2's stuck events 3.14 -> 4.08 a match. Restoring 4066 -> 4233, which the link walker crosses 5 of 5: 3.56. Bots in play aim that drop at the floor edge the hull rests on. Both worse than the cut.

One file. Against master (NeotokyoRebuild#131): 1289 -> 1008 areas, 564,486 ->
381,464 bytes; areas no spawn can reach 32 -> 4; nav ladders 4 -> 5.

- Sliver areas merged into their neighbors on the same floor, and
  pockets no spawn reaches removed where nothing links in or no class
  can climb back. Kept: the boat top and a ledge near (-1562,62),
  which bots drop out of.
- The north canal walkway, a boat's gunwale over the water, is
  PRECISE + CLIFF (3929-3932, 4055, 4056, 4257): bots fell off it
  into the water.
- Ladder 6 is new, on the ladder brush near (624,-790). Ladder 2's
  top is lowered from z 223 to 200, where climbing bots hung under
  the ceiling, and no longer lists 4066 behind it, which did not
  link back.
- Drops with no clear column are cut: ladder 2's tops onto its foot
  (4068 -> 4237, 4068 -> 4239, 4069 -> 4239, 4066 -> 4233) and
  789 -> 2063. So are links the engine hull audit reads blocked both
  ways; areas no player hull can stand in are removed.
- The strip south of the plaza is split again as on master, and the
  plaza's east edge by 378 routes round the building corner.
- The water pump's obstacle tops (4304, 4307) follow the prop.
- Area and ladder ids follow master's where an area is the same
  place. Re-analyzed in game.

@sunmachine sunmachine left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@sunmachine
sunmachine requested a review from a team October 14, 2026 02:27
@sunzenshen
sunzenshen merged commit 014d5c8 into NeotokyoRebuild:master Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants