feedback1d WO: the preference route is 0.1.0's again; equal floor keeps the official route
Review follow-up to the D5 fix. Two changes in grid.js _buildField: - The road-over-floor preference smoothing is 0.1.0's again: its line of sight may cover non-blockable tiles (Bresenham footprint, diagonal-step corners included) only on the tile's own raw chain, and the jump stops at the first ancestor it cannot see so. Exact crossings (a corner touch is not a crossing) are used only to choose between the official and the preference pointer. The previous version let the preference brush the corner of off-chain floor, so on 战场#02's Final Assault the right-half exit route (2,10) -> (3,11) slipped past an operator on (2,11) while the left half was still blocked on (2,9). Both halves now mirror each other again ((2,10) -> (2,11) -> (4,11)). - On an equal floor count the official pointer stays; the preference pointer wins only when it merely skips a collinear official waypoint (same walk). The old "farther waypoint" tie-break could bend an official route without saving any floor, e.g. a crate on (10,6) of 战场#04 brought back the L via (9,8) for the lower gate. Still 140 of 154 stage routes official; data/stages.json groundPaths regenerated (战场#02 boss right exit back to 0.1.0's, device-less helper paths of #03 / #04 / #06 follow the same rule). New tests: 战场#02 boss exits mirror and are blocked beside the exit; a single crate on any tile of an active stage never leaves a gate route non-official without crossing strictly less floor. The cross-check reference port follows both rules.
This commit is contained in:
1 parent
d8c62a96b5
commit
7a3918eab9
8 files changed
+147
-74
No files matched your search
+8
-7
@@ -150,13 +150,14 @@ HP, then `kill(old, null)` — uncounted, no bounty; the client sees a `die` and
|
||||
|
||||
WALK legs pathfind on the stage grid inside the rect with the official flow field (grid.js: 4-direction SPFA from the
|
||||
destination, crates cost 1000, then Bresenham line-of-sight smoothing — research 08 §3.4). The official route stays
|
||||
unless the road-over-floor preference route (the fewest non-blockable tiles among equal-length chains, smoothing that
|
||||
never cuts across floor its grid route does not walk; user playtest #2 item 2) crosses fewer non-blockable tiles
|
||||
(floor / gate lanes) — "crosses" = passes through the tile's interior, a corner touch does not count (`grid.js`
|
||||
`segmentTiles`; community report D5 after 0.1.0: 战场#04's lower-gate enemies cut diagonally from row 9 into row 10 as
|
||||
officially). test/sim/pathing-official.test.js lists the 14 of 154 stage routes that still differ from the official
|
||||
ones (战场#01's col-8 road, the boss exits of 战场#01 / #02 …); test/sim/pathing-blockable.test.js audits the floor
|
||||
crossed. Enemies re-path whenever
|
||||
unless 0.1.0's road-over-floor preference route (the fewest non-blockable tiles among equal-length chains, a line of
|
||||
sight that never covers floor — diagonal-step corners included — its grid route does not walk; user playtest #2 item 2)
|
||||
crosses strictly fewer non-blockable tiles (floor / gate lanes); "crosses" = passes through the tile's interior, a
|
||||
corner touch does not count (`grid.js` `segmentTiles`; community report D5 after 0.1.0: 战场#04's lower-gate enemies cut
|
||||
diagonally from row 9 into row 10 as officially), and on equal counts the official route stays.
|
||||
test/sim/pathing-official.test.js lists the 14 of 154 stage routes that still differ from the official ones (战场#01's
|
||||
col-8 road, the boss exits of 战场#01 / #02 …); test/sim/pathing-blockable.test.js audits the floor crossed. Enemies
|
||||
re-path whenever
|
||||
an obstacle changes (`grid.version`), after a displacement and when 诱导 / 恐惧 ends (the 恐惧 and 诱导 walks likewise
|
||||
re-plan from where the enemy stands after an obstacle change or when something else moved it — a push, or for 诱导 an
|
||||
outranking 恐惧); the smoothed chain is only line-of-sight
|
||||
|
||||
Reference in new issue
Block a user