Skip to content

ntre_ghost_ctg: navmesh rework - #163

Merged
sunzenshen merged 3 commits into
NeotokyoRebuild:masterfrom
sunzenshen:navmesh-ghost-release
Oct 14, 2026
Merged

sunzenshen merged 3 commits into
NeotokyoRebuild:masterfrom
sunzenshen:navmesh-ghost-release

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

ntre_ghost_ctg: navmesh rework

One file, neo/maps/nav/ntre_ghost_ctg.nav.

Dependencies and status

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

Helped by (measured better with it on the harness's research build; the mesh does not wait on it):

Related, open: NeotokyoRebuild/neo#2179 ("Bots avoid neo_npc_targetsystem via nav PVS"), so bots avoid the tank in
non-competition play. The A/B on master ran without it.

At a glance

master this PR
nav areas 1682 1254
file size 1,257,663 bytes 793,873 bytes
nav ladders 1 2, linked up and down
areas no spawn reaches over any link 39 in 23 pockets 22 in 19
the same by each class's climb limit: Recon / Assault / Support 39 / 42 / 42 22 / 27 / 27
areas entered with no way back 1 (3248) 0
objectives a team cannot reach none none (12 of 12, both teams)
bot events a match on neo master (A/B below) 21.3 9.5
stuck episodes a match on neo master 4.1 1.5

What changed

  • Areas the engine blocks at round start, where a brush or prop stands over an area's center, are cut around the
    obstacle or split.

  • Walk links a player hull cannot cross are cut. An engine hull audit (a Recon hull swept along each link on 4 u
    lanes) found no clear lane on 34 links bots got stuck on, most past the hanging robobags and their racks, the rest
    past handrails, pipes and a cylinder. Five areas left with no way in are removed.
    Eight of these had been cut one way only. Seven of them, past robobags, a conveyor and a cylinder, are now cut both
    ways (the hull audit finds no clear lane in either direction), and the nook inside the robobag near (-912, 1800) is
    removed. The climb from 3450 to 15 (+51 u near (938, 2075)), whose drop back was cut on stuck evidence, is cut too.

  • The engine hull audit of the final file found more: links with no clear lane either way are cut both ways (two
    wall faces, a conveyor, a robobag rack, a crate, an office chair, two stair handrails, and a gap link across a
    conveyor), and strips that lie inside a prop are removed: under stair handrails, inside a robobag rack, a monitor
    wall, a post, two robot arms, a hack case and a golf cart, and the three ramps onto and into the golf cart near
    (-612, 3412).

  • Holes round twelve static props bots pressed against: two mech statues, a military desk, a car, a control-box
    post, crates and posts, each cut where the engine's hull audit finds a standing hull cannot be next to the prop.

  • Holes round two more mech statues in the big room near (-1038, 2458) and (-1366, 2476), a desk joined to the
    first one's hole, cut at hull height plus 4 u. The room's floor area ran under them, and its portal to the room's
    west part had its crossing point behind them, so bots walked straight into a statue: at the statue near (-952, 2490)
    1.42 events a match on the first revision of this mesh, against 0.52 on master, 66 of 71 heading for that portal.
    The floor round the holes is five areas that link round them, so every corridor of the room stays open; a larger
    carve of the room's middle, which closed them, was tried earlier and dropped (stuck events x1.82, routes moved into
    the hanging robobags). With the holes: 0 events at that statue (A/B below).
    The forklift and the catwalk posts are not carved: carving round them sent more bots into the forklift.

  • Hand edits where test bots got stuck:

    • the golf cart near (-825, -225): the strip west of it, near (-1060, -235), ran 5 u from the cart, so bots hugged it
      into the cart. The strip now stops half a hull off the cart and is PRECISE, so the path follower does not cut
      diagonally past it.
    • the forklift: the area that climbed 30 u onto its raised forks, inside the mast's reach, is removed
    • the block-top walkway over the aircon yard near (-370, 0, 224): the 75 u gap jump to an aircon top 130 u below is
      cut; bots landed short on the round aircon units, with no nav and too high to climb back
    • a crouch nook on a jumbo pipe near z 251 and its hiding spot are removed: bots going in to hide dropped off its side
      and pressed the warehouse wall
    • the two drops from ledge 4252 (z 220) to the floor north of it are cut: their drop point is behind the parapet
    • a link between two areas that touch only at a corner is cut
    • the 145 u drop from an 11 u strip on the catwalk near (-1213, 1881, 215) to stairs 257 u away is cut, with its
      climb back, which no class plans: no hull lane clears it, and bots of every class fell or stuck on every try
  • The stairway east of ladder 2's top, near (-160, 2050), is one ramp (area 4336, z 167 to 202) touching the landing and
    the corridor. Its steps are about 11 u, but the strip that modelled it was 25 u wide, sloped the wrong way, with 25 u gaps on
    both sides, so both links read as 22-24 u jumps, which the bot path cost prices at up to 10^6. Bots that had just climbed
    ladder 2 re-planned there, walked off the landing and dropped 139 u back to the ladder's foot. Master's mesh has the same
    strip. Within 60 s of topping ladder 2 (three A/Bs on neo master, the earlier revision of this mesh against this one):

    ladder 2 earlier revision this mesh
    climbs 144 172
    reach the corridor 84 (58 %) 128 (74 %)
    drop back to the foot 50 (35 %) 34 (20 %)

    The drops left are route choice: the re-plan when a climb ends picks a ground route of about equal cost.

  • The 227 u drop off the west end of the walkway near (-1375, 912, 255) to the floor is cut. It lands on three hanging
    light fixtures (static props 632-634) 135 u above the floor: 2 of the 15 bots that took it in 90 matches stayed on them for
    the rest of the round, about 10 "fell off the path" events a second (master's mesh has the same link). The drop was used
    0.17 times a match; the floor below keeps its other links.

  • A nav ladder on the climbable brush at (-338, 2012), which master's mesh lacked. Ladder 1, master's, is kept:
    at its foot 0.66 events a match on master and 0.42 on the first revision (first A/B), 0.74 on the first revision and
    1.22 on this mesh (second A/B); see "Known, not changed".

  • Walk links restored: 15 links that ran one way after earlier cuts get their missing direction back, where the
    hull audit reads them clear both ways (level links into small nooks), and drops back from rail tops and climbs are
    restored. Two more such pairs, at handrails near (638, 1650) and (638, 2075), read blocked both ways and are cut both
    ways instead. The pair 3096 / 3097 near (-300, 2475), whose end 3097 is a crouch area, is cut both ways: the audit
    sweeps a crouched hull there, and no test match gives evidence for walking it standing. 3097 keeps its other link.

  • Four drops keep no climb back. Their climbs were cut by an earlier pass that removes links that cross a
    railing and links onto a strip standing on a rail, unless the way round is missing or too long:

    • 4785 -> 4091 (43 u) off the 5 u rail top near (-460, 200, 259)
    • 4873 -> 376 (44 u) and 4873 -> 4860 (62 u) off the 5 u rail top near (-570, 1112, 259)
    • 2378 -> 720 (38 u) off a 25 u shelf board near (-1562, 1838, 66): the climb from 720 rises past the shelf's front
      bar, which the railing check reads as a rail. The board is still entered by its climb from 2374.
      No event at any of the four on this mesh.
  • The 25 u area 3248 near (-363, 2013, 28), entered only by a 139 u drop from ladder 2's top and touching its
    neighbor at a corner, is removed: a standing hull there is 94 % inside the wall and a pipe. It is a pocket on master too.

  • Kept after a look, though the audit reads them blocked: the desk top under the hack case that ghost spawn 5 lies
    on (without it the spawn is 74 u off the mesh), and the two ramp areas of the step plate on the catwalk near
    (-1120, 1875), which are the only walk way onto the west catwalk. No test match stuck there. The rail top near
    (-570, 1112, 259) keeps its climb from the walkway 4326 and the drop back, though the audit reads the drop blocked by
    the handrail: the climb is the only way onto the platform south of the rail (4858 to 4860), and without the drop
    back it would be a one-way climb. No event there.

  • Marks: NO_MERGE 93 -> 36, OBSTACLE_TOP 37 -> 2, CROUCH 16 -> 12, STAIRS 11 -> 9, PRECISE 0 -> 1.

  • Ids follow master's. 1215 of the 1254 areas keep a master id; 1006 of them have master's corners. 39 areas are new.

  • Re-analyzed in game after the edits, so the visibility lists bots use are current.

How it was tested

  • Reachability of the final file:
    • every spawn reaches every objective for both teams (12 of 12)
    • no dead end, no area a class can enter and not leave, no one-way climb of 18 u or more
    • routes within 10 % of master's but three: ghost spawn 4, defenders 5,530 -> 6,313 u (+14 %) and attackers
      4,254 -> 4,721 u (+11 %); ghost spawn 10, defenders 6,892 -> 7,685 u (+12 %)
    • by each class's climb limit, Recon does not reach 22 areas, Assault 27, Support 27 (by the bot planner's own limits, Support 59)
  • Removed floor. 17 regions a spawn reached on master, 133,840 sq u, are gone: the largest (102,974 sq u) is the
    prop holes in the big room's floor (the four mech statues); the others are smaller prop holes, rail-top strips, floor beside the golf cart near
    (-825, -225), nooks among the robobags, the pipe-top nook above and the golf cart ramps near (-612, 3412).
  • Falls. The map has no trigger_hurt.
  • Engine hull audit of the final file (every level link swept with a player hull in game):
    BLOCKED_LINKS map=ntre_ghost_ctg level_pairs=1927 oneway=0 keep=4 cut=0 area=0 check=0 dynamic=0 entity=1 one_way_drops=210 sinks(any/recon/assault/support)=0/0/0/0 audit_links=4289 mesh_walk_links=4287. The entity row is a
    hanging robobag; the 4 keep rows are the desk top and the step plate above; the 2 extra audit links are two links the
    file lists twice, as master's does.
  • A/B on neo master 092203f36 (Release dedicated server, harness logging only). Byte-identical copies of the map, one
    carrying each .nav, matches interleaved: CTG, the ghost pinned at each of the 10 ghost spawns in turn, 6 matches each (60 a
    mesh), 30 bots, default weapon damage (1.485), 1 round, 8 matches at a time, one XP tier a match rotated over the spawns.
    180 of 180 matches (a third arm ran the catwalk edit below) reached match end with 0 asserts. Events are counted as in the
    earlier A/Bs below. It ran the revision before the stair ramp and the drop cut. Two later batches ran that revision against this mesh
    the same way (30 and 20 matches a mesh): 10.3 and 10.9 events a match on the earlier revision, 9.0 and 10.5 on this one, no
    new spot.
a match, neo master master this PR
bot events 21.3 [17.8, 25.3] 9.5 [8.1, 11.1]
stuck events 15.9 5.7
stuck episodes 4.1 1.5
no path / fell off the path 1.47 / 3.97 1.00 / 2.83
fall deaths 0 0
kills 25.4 25.7
matches at match end with 0 asserts 60 of 60 60 of 60

The table leaves out one bot on each mesh that stood on the light fixtures above for the rest of its round (1179 and 323
"fell off the path" lines; the drop is cut in this mesh). Both meshes read higher on master's bot code than on the research
build below, and that revision is below master's at each of the 10 ghost spawns. Spots on it at 0.5 a match or more: the
fall at the west end of the catwalk loop near (-1274, 36) (0.97; master 2.13), the statue under the north doorway near
(-1385, 2289) (0.58), ladder 1's foot (0.55), and near ladder 2's foot at (-148, 2097) (0.50).

  • Two A/Bs on the harness's research build (neo master then, plus the open bot PRs above and further research bot changes),
    same bot code in both arms; "this mesh" there is the revision before the stair ramp and the drop cut. Byte-identical
    copies of the map, one carrying each .nav, matches
    interleaved: CTG, the ghost pinned at each of the 10 ghost spawns in turn, 5 matches each (50 a mesh), 30 bots, default
    weapon damage (1.485), 1 round, 8 matches at a time. Every match reached match end with 0 asserts. Events are stuck
    events (OnStuck plus FAIL_STUCK, without the spawn crush at round start and weapon scavenging), "fell off the
    path" and "no path". A stuck bot logs about one stuck event a second; a stuck episode is one bot's stuck events less
    than 10 s apart, counted once.

The first A/B ran master against the first revision of this mesh (before the holes round the two big-room statues
near (-1038, 2458) and (-1366, 2476)); a second A/B, the same way, ran that revision against this mesh.

a match master first revision first revision (second A/B) this mesh (second A/B)
bot events 13.1 [9.5, 17.1] 7.3 [4.9, 10.8] 7.4 [5.5, 9.2] 7.3 [5.8, 9.0]
stuck events 10.3 4.6 4.6 4.4
stuck episodes 2.9 1.2 1.1 1.3
no path / fell off the path 0.40 / 2.36 0.36 / 2.36 0.40 / 2.40 0.40 / 2.44
fall deaths 0 0 0 0
kills 24.6 25.5 25.1 25.7
matches with any event 50 of 50 47 of 50 48 of 50 46 of 50
matches at match end with 0 asserts 50 of 50 50 of 50 50 of 50 50 of 50

The events intervals overlap a little (master 13.1 [9.5, 17.1], this mesh 7.3 [5.8, 9.0]); stuck episodes, 2.9 against
1.2-1.3 a match, are the clearer difference. Over the whole map the holes change nothing measurable (second A/B).

Spots at 1 event a match or more: in the first A/B, master's stair and rail landing (2.70) and block-top drop (1.36), and
the first revision's statue near (-952, 2490) (1.42); in the second A/B, none on the first revision, and on this mesh
ladder 1 (1.22) and the block-top drop (1.20), both far from the statue holes (under "Known, not changed").

  • The big-room statues. At the statue near (-952, 2490): master 0.52 events a match, first revision 1.42 (first A/B) and
    0.18 (second), this mesh 0. A third batch on the three ghost pins whose matches had the first revision's episodes there,
    8 matches each a mesh: first revision 0.71 at that statue and 1.00 in the room, this mesh 0 and 0.38. The room
    around the statues: first revision 1.94 and 0.42 a match in the two A/Bs, this mesh 0.46. Between the statue near
    (-1366, 2476) and the one under the north doorway near (-1390, 2329), the second A/B reads 0.42 a match on this mesh and
    0.16 on the first revision, which read 0.52 there in the first A/B (master 0.28).

  • Master's leading spot, the stair and rail landing near (-1141, -31, 240): 2.70 events a match on master, 0.02 on this
    mesh; the golf cart corner near (-896, -270) 0.68 -> 0.14, the rail drop near (-425, 458, 216) 0.68 -> 0. The drop
    off the block-top walkway near (-1259, 10) (fell off the path, no stuck) 1.36 -> 0.72.

  • Bots fell off the 25 u walkway at z 220 near (-575, -138) onto the floor below it, near (-573, -192), 0.56 times a match
    here and 0.32 on master: all "fell off the path", no stuck event, no fall death. Over the whole map they are equal
    (2.36 a match on each mesh).

  • No event at the restored links, the nooks 1129, 1278, 4904, 2435 and 3334, the crouch pair 3096 / 3097, the step
    plate, the desk top or the golf cart ramps. The cylinder nook 4222: 1 event in 50 matches (master 2). The 3450 drop:
    1 "fell off the path" on each mesh. Ladder 2: 5 events in 50 matches.

  • Bots leave their spawns at round start on both meshes: 5 s after the round went live, no bot of either team was
    still within 64 u of where it stood, and the median bot had moved by 1.0 s.

Earlier batches, older revisions of this mesh

On 09-23 two of the changes above were each measured against the mesh just before it, not against master, on an
earlier research build with a 2 s pre-round freeze, counting OnStuck only. The link cuts, against the mesh before
them: 48.0 -> 39.0 a match (20 pairs, default damage), and 46 -> 0 events on the cut links. The prop holes, against the
mesh with those cuts (a separate batch, whose baseline also came to 48.0): 48.0 -> 34.1 (30 matches a mesh), at the
mech statues 2.6 -> 0.1, crates 1.8 -> 0.1, the double post 1.8 -> 0.0, the car 1.7 -> 0.7.

Known, not changed

  • Ladder 1 near (-290, 25), master's ladder, climbs to a ledge walled on the west and north. Its only way on is the
    catwalk loop: west about 900 u along a strip over the defenders' spawn, round a hairpin at x -1340 and back east on a
    parallel strip, then north on the walkway along the spawn hall's east wall into the building's upper floor. The 50 u
    between the strips is a full-height wall, so the loop is the real geometry. On neo master, within 60 s of the climb
    (60 matches a mesh): 54 % of climbers reach the upper floor (188 of 351; master's mesh 39 %, 143 of 364), in a median
    27 s; 85 fall off the loop and 54 take a planned drop off it back to the ground; 5 stuck at the top (with #2176).
    At its foot 0.55 events a match.
  • The hairpin at the west end of that loop near (-1340, -100, 215): bots that run west along the south strip come out of
    the turn heading north-east and carry on over the north strip's north edge, which has no rail, to the floor near
    (-1272, 30) (190 u, not lethal): 0.97 "fell off the path" a match on this mesh, 2.13 on master's, the most frequent fall
    on both. Pulling the strip's area back from the edge made it worse (1.47); PRECISE on the turn stopped the falls (0.07)
    but bots then stuck in the turn (stuck events 7.8 -> 28.7 a match). Needs a clip brush on that edge or path-follower
    handling of a tight turn beside a drop, not a mesh change.
  • Optional, not in this PR: NAV_MESH_AVOID on the ladder 1 ledge, the south strip and the turn (branch
    sunzenshen:navmesh-ghost-catwalk, attributes only). On neo master: climbers 351 -> 149 in 60 matches, 63 % of them reach
    the upper floor, falls off the loop 85 -> 38; over the whole map 11.3 [8.3, 15.2] events a match against this mesh's 9.5,
    no gain.
  • The mech statue under the big room's north doorway near (-1390, 2329), static prop 34, still stands on nav
    areas, as on master: 0.42 events a match near it on this mesh (second A/B), 0.28 on master.
  • The hanging robobags and girlbot bodies are physics props; the mesh does not carve round them, since they move.
    The robobag curtain at areas 469, 833 and 1278: 0.06 events a match on master, none on this mesh. The girlbot bodies
    near (-2190, 3685): 0.64 events a match on master, 0.72 on the first revision, 0.52 on this mesh and on the first
    revision in the second A/B.
  • The forklift (static prop 703) and a holed girder wall near (-320, -100): stuck spots left to bot code. Rate on this
    mesh, from the A/B: forklift 0.08 events a match on master, none here; girder wall 0.08 on master, 0.06 here.
  • Defender spawns sit at z 16.9999, 1-6 u under the floor at most of them, so a player starts inside the world and is
    lifted free by the server within about 1 s. The default 15 s freeze covers it. A map issue, not a mesh one.
  • Unreached floor: 19 pockets (22 areas, master 39 in 23) that no link from a spawn reaches, most of them single
    areas on prop and ledge tops; one, area 2256 near (-1162, -738), has no link at all, as on master. No test-match event
    in any of them.

One file. Against master: 1682 -> 1250 areas, 1,257,663 -> 787,191
bytes; 2 nav ladders (master 1).

- Areas the engine blocks at round start are cut around the obstacle,
  and standing room is carved round props where test bots stuck.
- Walk links a player hull cannot cross are cut both ways: past the
  hanging robobags and their racks, conveyors, handrails, a cylinder,
  a crate and an office chair; strips inside a prop are removed (the
  stair handrails, a robot arm, a monitor wall, a post, two golf
  carts, the nook inside robobag 88).
- The climb 3450 -> 15 near (938, 2075) is cut; its drop back was
  cut earlier on stuck evidence.
- A nav ladder on the climbable brush at (-338, 2012); the dead end
  3248 at its foot, inside the wall and a pipe, is removed.
- Links cut one way by earlier passes get their missing direction
  back where the hull audit reads them clear both ways (15), or are
  cut both ways where it reads them blocked.
- Hand edits at the golf cart (PRECISE strip), the forklift, the
  aircon yard gap jump, a pipe-top nook and ledge 4252.
- Re-analyzed in game after the edits.

Engine hull audit of this file: oneway 0, cut 0, area 0, check 0,
entity 1 (a robobag), keep 4 (the desk top under ghost spawn 5,
the ramp areas of a catwalk step plate), sinks 0 for every class.
100-match A/B against master, same bot code (30 bots, 10 ghost pins
x 5, 1 round, 8 wide): events a match 13.1 -> 7.3, stuck events
10.3 -> 4.6, stuck episodes 2.9 -> 1.2; kills 24.6 / 25.5; all 100
matches ended clean.
The big room's floor area ran under two mech statues (static props)
and a desk. Its portal to the room's west part has its crossing point
behind them, so bots walked straight into a statue: 1.42 events a
match at the statue near (-952, 2490) in the 100-match A/B against
master (master 0.52), 66 of 71 heading for that portal.

Both footprints are now holes in the floor area, at hull height plus
4 u, the desk joined to its statue's hole. The floor around them is
five areas that link round the holes, so every corridor stays: 1250
-> 1254 areas, 787,191 -> 793,887 bytes. Re-analyzed in game.

Engine hull audit unchanged: oneway 0, cut 0, area 0, check 0,
entity 1, keep 4, sinks 0 for every class. Reachability as before.

Previous file against this one, same bot code, 30 bots, 8 wide:
- the 3 ghost pins with the statue episodes x 8: statue 0.71 -> 0
  events a match, the room 1.00 -> 0.38
- 10 ghost pins x 5: statue 0.18 -> 0; events a match 7.4 -> 7.3,
  stuck episodes 1.1 -> 1.3, kills 25.1 / 25.7, no fall deaths; all
  148 matches ended clean
The stairway east of ladder 2's top, near (-160, 2050), has steps of
about 11 u, but area 4336 modelled it as a 25 u strip sloped the wrong
way with 25 u gaps on both sides, so its links to the landing and the
corridor read as 22-24 u jumps. The bot path cost priced each at
10^5-10^6, and bots that had just climbed ladder 2 re-planned, walked
off the landing and dropped 139 u back to the ladder's foot. 4336 is
now one ramp from z 167 to 202 touching both. Over three A/Bs on neo
master, 50 of 144 climbs turned back (35 %) before and 34 of 172 (20 %)
after; 58 % -> 74 % reached the corridor.

The 227 u drop 4314 -> 225 off the west end of the walkway near
(-1375, 912, 255) lands on three hanging light props (632-634) 135 u
above the floor. 2 of the 15 bots that took it in 90 matches stayed
on them for the rest of the round. The drop is cut; it was a shortcut
used 0.17 times a match, and 225 keeps its other links.

Re-analyzed in game. Hull audit: no blocked link beyond the 4 kept
and the robobag, as before.
@sunzenshen
sunzenshen requested a review from sunmachine October 13, 2026 01:21
@sunzenshen
sunzenshen marked this pull request as ready for review October 13, 2026 01:21
@sunzenshen
sunzenshen merged commit 0d700a7 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