feedback1d WO: official route wherever it crosses no more floor (D5 战场#04 diagonal)

Community report: on 战场#04 活性源石 the lower-gate enemies walked two tiles left
of the red gate and then straight up instead of crossing diagonally from row 9
into row 10 as in the official game. The playtest #2 road-over-floor smoothing
counted the corner tiles of a diagonal step as crossed, so it bent the official
(9,10) -> (10,7) into (9,10) -> (9,8) -> (10,8) although that line only brushes
the corner of the floor tile (10,9).

grid.js now keeps the official flow field (research 08 §3.1) and replaces a
tile's pointer by the road-over-floor preference one only where its route
crosses strictly fewer non-blockable tiles (or as few with a farther waypoint);
a segment crosses the tiles whose interior it passes through (segmentTiles,
exact geometry). 140 of the 154 stage x gate x field routes are now official
(was 109); the 14 left avoid floor the official route walks over (战场#01's
col-8 road of playtest #2, boss exits of 战场#01 / #02, two 联防 partner gates).
data/stages.json groundPaths regenerated.
This commit is contained in:
sganggs committed 2026-10-03 04:14:43 +08:00
1 parent 7f134737ce
commit d8c62a96b5
9 files changed
+460 -153

No files matched your search

+8 -3
View File
@@ -149,9 +149,14 @@ ends by spawning a new 初始模式 copy on its level branch route (`left_hand_o
HP, then `kill(old, null)` — uncounted, no bounty; the client sees a `die` and a `spawn`.
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). Among equal-length routes the
one crossing the fewest non-blockable tiles (floor / gate lanes) wins, and a smoothed segment never cuts across floor
the grid route does not walk (user playtest #2 item 2; test/sim/pathing-blockable.test.js). Enemies re-path whenever
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
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