troytt
334b957ab6
Merge branch 'fix/issue-51'
...
# Conflicts:
# src/game/wilderness.ts
2026-09-17 08:51:55 +00:00
troytt
4f8e077bbb
Merge branch 'fix/issue-50'
...
# Conflicts:
# src/game/maze.ts
2026-09-17 08:50:47 +00:00
troytt
4c584db273
Merge branch 'fix/issue-49'
...
# Conflicts:
# src/game/maze.ts
2026-09-17 08:49:32 +00:00
troytt
893e9b8550
Merge branch 'fix/issue-48'
...
# Conflicts:
# src/game/maze.ts
2026-09-17 08:41:40 +00:00
troytt
e1163b1253
Merge branch 'fix/issue-47'
...
# Conflicts:
# src/game/maze.ts
2026-09-17 08:40:55 +00:00
troytt
c310119ed2
Merge branch 'fix/issue-46'
2026-09-17 08:40:20 +00:00
troytt
80b2fd0f71
Merge branch 'fix/issue-45'
2026-09-17 08:40:15 +00:00
troytt
c83499c591
Merge branch 'fix/issue-44'
...
# Conflicts:
# src/scene/act-scene.ts
2026-09-17 08:40:10 +00:00
troytt
9af2c07c38
Merge branch 'fix/issue-43'
2026-09-17 08:39:26 +00:00
troytt
c2bda29211
Merge remote-tracking branch 'origin/feat/monster-streaming' into feat/monster-room-placement
2026-09-17 08:36:02 +00:00
troytt
8e46b64156
feat(monsters): room-local pack allocation and clustering placement
2026-09-17 08:35:11 +00:00
troytt
71fdaaefe3
feat(sim/monsters): lazy room population with bPopulated and active/sleeping streaming
2026-09-17 08:33:19 +00:00
troytt
11e2e42731
perf(render): optimize GL state with immutable texStorage2D, uniform caching, and configurable discard ( fixes #20 )
2026-09-17 08:16:05 +00:00
troytt
33585afe8d
test(render/perf): comprehensive lifecycle verification and performance regression suite ( fixes #16 )
2026-09-17 08:15:13 +00:00
troytt
167928a31f
feat(sim/loop): decouple simulation from rAF with independent timer and separate TPS/FPS metrics ( fixes #19 )
2026-09-17 08:12:57 +00:00
troytt
92d6731dae
feat(map-gen/wilderness): data-driven wilderness SuperUniques and landmark entities from SuperUniques.txt ( fixes #57 )
2026-09-17 07:49:31 +00:00
troytt
46b7166f22
feat(map-gen/wilderness): thematic clustering and dispersed distribution for waypoints and shrines ( fixes #56 )
2026-09-17 07:36:39 +00:00
troytt
2fe5f4d892
feat(map-gen/wilderness): dynamic siege trench and fortification generation for Bloody Foothills ( fixes #54 )
2026-09-17 07:30:54 +00:00
troytt
3f463ba777
feat(map-gen/wilderness): extend road and stone divider networks to Acts 2, 3, and 5 ( fixes #55 )
2026-09-17 07:28:07 +00:00
troytt
81d2172cca
feat(map-gen/maze): implement 11 official dungeon special passes ( fixes #49 )
2026-09-17 07:27:47 +00:00
troytt
723f5dce27
feat(map-gen/wilderness): implement Act 3 jungle river network and branch topology ( fixes #53 )
2026-09-17 07:25:07 +00:00
troytt
8baf91c51f
feat(map-gen/wilderness): implement outdoor level initializers for acts 2-5 ( fixes #51 )
2026-09-17 07:11:19 +00:00
troytt
ffc2b297f6
feat(map-gen/maze): implement dynamic dungeon object spawning pipeline ( fixes #50 )
2026-09-17 07:08:47 +00:00
troytt
12588ea948
feat(map-gen/wilderness): support multi-DT1 weighted ground tile blending ( fixes #52 )
2026-09-17 07:08:24 +00:00
troytt
801afd7ddb
fix(map-gen/maze): enforce Levels.txt global bounds SizeX/SizeY on room growth ( fixes #48 )
2026-09-17 06:59:31 +00:00
troytt
c56b808d7a
feat(renderer/map): support animated tiles loop playback ( fixes #43 )
2026-09-17 06:34:02 +00:00
troytt
776e2d3c20
feat(map-gen/maze): integrate waypoint room into maze preset replacement pass ( fixes #47 )
2026-09-17 06:33:16 +00:00
troytt
8bb99ded7e
refactor(map-gen/maze): align special room placement with D2 scanning rules ( fixes #46 )
2026-09-17 06:20:59 +00:00
troytt
72aa835260
refactor(map-gen/preset): move Chaos Sanctuary (Level 108) into preset pipeline ( fixes #45 )
2026-09-17 06:20:35 +00:00
troytt
57c13bdc26
feat(renderer/roofs): implement dynamic roof fade when player enters shelter ( fixes #44 )
2026-09-17 06:19:01 +00:00
troytt
a01cffa0b5
refactor(map-gen/preset): fix variant selection and seam orientation alignment ( fixes #42 )
2026-09-17 06:18:42 +00:00
troytt
1fa3f8b7a2
chore(git): ignore node_modules symlinks in worktrees
2026-09-17 05:50:28 +00:00
troytt
87a575f4e8
chore(tooling): add git worktree helper script for multi-session development
2026-09-17 05:49:58 +00:00
troytt
80c74a6b95
test(cull): add unit test for bounds rebuild on level switch
2026-09-17 05:48:51 +00:00
troytt
4ea77e2c00
fix(scene): handle level transition entity cleanup, art reloading & wilderness floor gaps
2026-09-17 05:48:38 +00:00
troytt
e9f2ceec9b
feat(map-gen/population): implement wilderness population phase, waypoints, shrines, superuniques & safe zones ( fixes #36 )
2026-09-17 03:44:12 +00:00
troytt
93a854d9ad
feat(combat): implement Diablo II 1.10+ combat math & PvE depth mechanics ( fixes #24 , fixes #39 )
2026-09-17 02:52:00 +00:00
troytt
78b5351cce
feat(maze): 拓扑 BFS 房间选择与 LvlPrest 楼梯预制体替换,消除迷宫兜底楼梯 ( fixes #37 )
...
基于 Scheme C 实现拓扑 BFS 死胡同/房间选择与 LvlPrest.txt 全间楼梯预制体替换,
彻底补齐全五幕 12 类迷宫的完整上下行楼梯配置,将迷宫兜底楼梯降为 0。
1. 词法分类器扩展 (classifyMazePieceName)
- 在 KIND_PREFIXES 中新增 Pitspawn / Bonebreak (quest)、Cath (down)、
Drain (next)、Warp (prev) 关键词映射。
- 增加对反转词序语法 (/^([NSEW]+)\s+(up|down)$/i) 的支持,正确识别
Act 5 - Temple SE up 与 NE/NW/SW Down。
- 在 buildPieceIndex 中引入 prev 预制体兜底,解决尼拉塞克神殿东南角无普通
房间预制体的问题。
2. 迷宫楼梯表补齐 (MAZE_LEVEL_TYPE_PROFILES)
- 补齐此前 specials: [] 为空的全部 12 类迷宫上下行楼梯规则 (涵盖 Barracks,
Jail, Sewer, Tomb, Lair, Kurast, Dungeon, Kurast Sewer, Lava, Ice Caves,
Temple, Baal)。
- 库拉斯特下水道一层按双地面入口拆分为 NW/NE 与 SW/SE 两组独立规则。
- 王宫监牢一、二层限制变体为 0..2,排除专为第三层设计的无楼梯 File4。
3. 拓扑 BFS 房间选择与死胡同向外生长 (bfsDistances & placeSpecialGroup)
- 从迷宫起点出发计算 BFS 拓扑距离:
* 原地替换 (Phase 1):下行/任务房间优先选择 BFS 距离最远的死胡同或普通房间,
上行入口优先选择离起点最近的房间。
* 死胡同生长 (Phase 2):无匹配边掩码房间时,从最优候选父节点向外生长死胡同
房间并重选父节点开门预制体。
4. 验证效果
- 全量 365 张地图中,70 个迷宫关卡(210 张迷宫地图)的 fallback 楼梯数
从 212 处彻底归零 (100% 升级为 DS1 Warp0..7 真实美术标记瓦片)。
- 全量真实美术瓦片总数从 218 跃升至 430 (+212)。
2026-09-16 23:39:33 +00:00
troytt
29cfccaa37
feat(world): 全局世界连通、关卡无缝切换、传送点、传送门与小地图 ( fixes #23 )
...
实现《暗黑破坏神 II》全五幕(136 个关卡)的完整世界连通拓扑、烘焙期链接落位、
运行时无缝边界与楼梯渐变过渡、传送点网络、城镇传送门以及实时小地图。
1. 全局世界连通拓扑 (src/game/world-graph.ts)
- 融合 Levels.txt (Vis0..7, Warp0..7)、28 对野外无缝相邻接缝 (SEAMLESS_ADJACENCY)、
23 对双向传送门链接 (PORTAL_LINKS) 以及 LvlWarp.txt (88 行几何偏移)
构建 136 关卡、288 条有向边连通图。
- 实现确定性边界方向分配器 (assignGateSides),保证同一关卡的多条边不会冲突。
2. 楼梯瓦片识别与几何计算 (src/game/warp-tiles.ts, src/game/level-links.ts)
- findWarpTiles: 扫描 DS1 墙体层 (type 10/11) 提取 style 0..7 对应 Warp0..7 瓦片。
- level-links: 显式栈 4-连通分量洪水填充提取最大可行走主区域 (largestWalkableRegion),
向内扫描边界缺口 (findBorderOpening),以及计算安全向内落脚点 (seamArrivalSpot)。
3. 野外道路与锚点导出 (src/game/wilderness.ts, src/game/acts.ts)
- planAct1OutdoorLevel 导出城镇过渡口、野外边界门、洞穴入口与路边地标。
- 实现泥土路网与 256 项 8 邻域位掩码地砖自动铺设。
4. 烘焙期流水线增强 (scripts/pack-act-assets.ts)
- buildSceneLinks 5 级流水线:DS1 真实瓦片 -> 野外生成器锚点 -> 迷宫楼梯间 ->
预设边界扫描与营地四朝向自适应 -> 兜底安全落脚点。
- 全量重新烘焙 samples/d2-packs (365 张地图),输出 entrances, warps, waypoints
与 world-graph.json。
5. 运行时交互与表现 (src/scene/act-scene.ts, src/scene/transition.ts, src/game/portal.ts, src/ui/minimap.ts)
- 支持接触边界无缝切换 (90ms 淡入淡出) 与按 G 键 / 交互楼梯传送 (220ms 淡入淡出)。
- swapLevel 保留玩家状态(位置、属性、背包、随从)并在对应配对出入口安全落地。
- WaypointNetwork: 小站发现与跨图传送;TownPortalSlot: T 键回城与往返传送。
- Minimap: Tab 键切换右上角小地图 / 全屏自动地图,绘制迷雾、玩家、出口、小站、回城门。
6. 验证护栏与测试
- verify:world-graph: 40,003 项断言确认全 136 关卡全连通、边双向对称。
- verify:world-walk: 模拟玩家徒步全图 338 张有出口地图,1046/1046 出入口 100% 互达。
- 补齐 tests/world-graph.test.ts, tests/warp-tiles.test.ts, tests/wilderness-roads.test.ts。
2026-09-16 23:39:33 +00:00
troytt
1f2f19641f
fix(map-gen): fix Act 1 road/stone wall connectivity, Blood Moor river+bridge layout & Act 3 jungle river alignment
2026-09-16 04:31:10 +00:00
troytt
602565030f
fix(map-gen): fix Act 4 Chaos Sanctuary, Act 3 Jungles/Travincal/Kurast, Act 2 Deserts & Act 5 Frozen Tundra layouts
2026-09-16 03:30:40 +00:00
troytt
25ae7289ee
fix(map-gen): assemble Act 5 Bloody Foothills 15 siege strips, Barricade fortifications & Act 1 stone walls/dirt roads (Issue #35 )
2026-09-16 03:06:48 +00:00
troytt
dcd3da0a22
feat(combat): disable monster aggro in act-scene so monsters stay idle in place
2026-09-16 02:21:17 +00:00
troytt
d4fb176031
perf(renderer): implement Raw 8-bit GPU Index Texture (gl.R8) + Shader Hardware Palette Lookup ( #34 )
2026-09-16 02:10:34 +00:00
troytt
2527678c10
fix(packs): restore full Acts 1..5 index and map/bake all 741 monster IDs across all acts ( #33 )
2026-09-16 01:43:11 +00:00
troytt
270c743aef
perf(entities): offline pre-bake Sorceress and monster atlases into Act packs ( #30 )
2026-09-16 01:16:38 +00:00
troytt
d6e624829a
fix(monster): fix loading performance, monster facing, and spawn logic ( #30 , #31 , #32 )
...
- Fix #30 : Concurrent layer/animation decoding and shared MPQ archive caching to reduce load latency
- Fix #31 : Use dir64ToDcc for permuted 8-direction DCC extraction in monster art compositing and align 8-way facing calculation
- Fix #32 : Prevent monster spawning in town/safe zones, support hellbovine cow packs, and cluster packs properly
2026-09-15 15:03:28 +00:00
troytt
25ab2eea9d
docs: 标记 M7 里程碑为已完成
2026-09-15 09:52:35 +00:00
troytt
9a0e91849e
feat(monsters): 完成 M7 怪物 COF/DCC 8向动画与美术层接入
...
- 新增 src/game/monster-art.ts: 支持怪物 16 部位通道映射与多图层 COF/DCC 合成,支持 8 向行走 (wl) 与待机 (nu) 动画
- 新增 src/game/monster-mapping.ts: 建立怪物 ID 到美术 Token 与武器类型的映射规范
- 更新 src/scene/act-scene.ts: 怪物按类型按需异步加载美术图集,由红色占位色块升级为真·8向动态怪物体素
- 更新 scripts/verify-monsters.ts: 增加对血色荒野核心怪物 (FA, ZM, SI) 的动画解码断言 (74/74 checks passed)
- 新增 tests/monster-art.test.ts 与 tests/monster-mapping.test.ts (全部 528 个单元测试均通过)
2026-09-15 09:45:23 +00:00
troytt
4294a16a48
fix(monsters): 按 d2mods.info 官方规范修正 MonLvl 与 MonStats 等级/半径/稀有度逻辑
...
- 依据 KB 354: 读取 MonLvl.txt 单机专属 'L-' 列,确保单机模式数值准确
- 依据 KB 360: 实现两分支 monsterLevelFor 等级判定(普通难度与 Boss 维持自身等级,噩梦/地狱普通怪取区域等级)
- 依据 KB 360: aidist 为空或 0 时回退至默认 35 格 (560px 一屏距离)
- 依据 KB 360: 增加 sparsePopulate 稀有生成概率属性并在选怪时过滤
- 全量下载并整理 d2mods 官方 KB 120 篇技术文档至 docs/d2kb/ 并附索引
- 验证: 51/51 unit tests passed, 65/65 verify-monsters checks passed
2026-09-15 08:57:15 +00:00