Skip to content

New terrain engine + extractor - #78

Open
H0zen wants to merge 1 commit into
mangosfour:masterfrom
H0zen:maps
Open

New terrain engine + extractor#78
H0zen wants to merge 1 commit into
mangosfour:masterfrom
H0zen:maps

Conversation

@H0zen

@H0zen H0zen commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

One terrain engine, in src/shared/terrain. FusedTerrain answers with a column of surfaces instead of a single height, so terrain, WMO floors, liquid and dynamic game objects all come back from one query. DynamicCollision puts doors and lifts in that same column.

One extractor replaces the three separate tools. mangos-extractor bakes DBCs, game-object models, terrain tiles, vessel decks and the navmesh, in that order, each from the output of the last. The navmesh is built from the baked tiles, so the pathfinder walks the surface collision actually answers with.

Client support is 5.4.8. MCNK offset 0x14 is read as holes_high_res, not as an offset. Hole maps are 64-bit per chunk. MCVT is located by scanning the sub-chunks. MH2O resolves through the LiquidObject chain, and object 42 is depth-only ocean. The archive set is the Mists one, with all eighteen update builds.

The update archives now patch each other, not only the bases. Without that, 1374 files across 29 maps resolved to pre-release builds.

Three Recast accuracy values from #250 are restored. On slope, navmesh points more than a yard off the floor fall from 40.5% to 10.9%.

mangos-height-check scores a bake against a position corpus, separating liquid, model floors and unsettled probes rather than averaging them in. 107 tests cover the parsers, the tile format and the collision model.

Removed: src/game/vmap, src/tools/Extractor_projects, src/tools/Extractor_Binaries and the GridMap class.

Measured on a 5.4.8 client: 9724 tiles over 288 maps. Of 2164 recorded client positions, 98.70% land within 2 yards of the baked floor, 99.14% on dry ground.

One terrain engine, in src/shared/terrain. FusedTerrain answers with a column of
surfaces instead of a single height, so terrain, WMO floors, liquid and dynamic game
objects all come back from one query. DynamicCollision puts doors and lifts in that
same column.

One extractor replaces the three separate tools. mangos-extractor bakes DBCs,
game-object models, terrain tiles, vessel decks and the navmesh, in that order, each
from the output of the last. The navmesh is built from the baked tiles, so the
pathfinder walks the surface collision actually answers with.

Client support is 5.4.8. MCNK offset 0x14 is read as holes_high_res, not as an offset.
Hole maps are 64-bit per chunk. MCVT is located by scanning the sub-chunks. MH2O
resolves through the LiquidObject chain, and object 42 is depth-only ocean. The archive
set is the Mists one, with all eighteen update builds.

The update archives now patch each other, not only the bases. Without that, 1374 files
across 29 maps resolved to pre-release builds.

Three Recast accuracy values from #250 are restored. On slope, navmesh points more than
a yard off the floor fall from 40.5% to 10.9%.

mangos-height-check scores a bake against a position corpus, separating liquid, model
floors and unsettled probes rather than averaging them in. 107 tests cover the parsers,
the tile format and the collision model.

Removed: src/game/vmap, src/tools/Extractor_projects, src/tools/Extractor_Binaries and
the GridMap class.

Measured on a 5.4.8 client: 9724 tiles over 288 maps. Of 2164 recorded client positions,
98.70% land within 2 yards of the baked floor, 99.14% on dry ground.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 10 critical · 61 medium · 29 minor

Alerts:
⚠ 100 issues (≤ 0 issues of at least minor severity)

Results:
100 new issues

Category Results
UnusedCode 35 medium
Security 10 critical
Complexity 26 medium
29 minor

View in Codacy

🟢 Metrics 1727 complexity · 59 duplication

Metric Results
Complexity 1727
Duplication 59

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant