refactor(wilderness): 用基于控制顶点图(DRLGVER)的样条小径取代栅格化 A* 道路 #66
Labels
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: troytt/diablo2-web#66
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
在原版暗黑 2 的室外关卡生成中:
泥土小径(
DRLG_OUTDOORS_GenerateDirtPath/DRLGVER_CreateVertices/byte_6FDCF958)并不是由网格 A* 搜索栅格化生硬连线而成的,而是:而当前 Web 引擎采用直线/A* 栅格化搜索(
rasterizeDirtPathSegment),配合简单的 8 邻域位掩码查表(DIRT_PATH_TILE_LUT)。这导致当前道路线条往往较为生硬,且在穿越不同地形区块时容易出现不自然的几何拐弯或对预设地貌造成切削。改造内容
DRLGVER_CreateVertices):openGates)与地标预设位置,建立关卡道路的宏观控制顶点图。验收标准
tests/wilderness-roads.test.ts、tests/wilderness-roads-multi-act.test.ts)全部通过npm run typecheck零错误,npx vitest run全绿