Skip to content

Replace .json based zone loading with direct parsing. - #71

Merged
eXpl0it3r merged 1 commit into
themeldingwars:masterfrom
Xsear:collision2
Aug 19, 2026
Merged

Replace .json based zone loading with direct parsing.#71
eXpl0it3r merged 1 commit into
themeldingwars:masterfrom
Xsear:collision2

Conversation

@Xsear

@Xsear Xsear commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Previously we generated .json chunk/asset files through an intermediary .xml step, PIN then had to load json, create the Bepu objects, and finally cache the full result as one binary per zone. Now the parsing logic is available in PIN directly (through Lib/Shared.Collision) removing the need for .json, and we save the Bepu result per chunk and asset as binary. The server will now wait for the zone to finish loading before starting simulation and accepting connections.

The settings are updated so that AssetDBPath and MapsPath are to be set to the corresponding folders in the Firefall installation. CachePath can be set to control where PIN should look for the cached chunk and asset files. Zone collision is only loaded when LoadMapsCollision setting is enabled. ForceReloadZone can be set to ignore cache.

If PIN doesn't find cached chunks for a zone, it will load and generate chunks one at a time in sequence.
The CollisionGenerator tool allows for pre-generating these cache files and will then process multiple at once.
Run it with something like dotnet run -c Release --cache-path your\output-dir --maps-path your\firefall\system\maps --all-zones. Then match the CachePath to the same output directory.

When running PIN or CollisionGenerator, use release mode for the best performance.
On my system, caching all 281 chunks takes around 1-2 minutes. Loading the cached chunks for New Eden about 8-10 seconds. The cache files take up about 14GB of disk space. The server uses about 9GB ram when New Eden is loaded.

During generation, you may see warnings about some convex vertices shapes. This is a preexisting issue.

Adds CollisionGenerator tool for pregenerating cache.
The server will wait for the zone to finish loading before starting simulation and accepting connections.
@zSleepwalker

Copy link
Copy Markdown
Contributor

Shouldn't the json file(s) be removed with this?

@Xsear

Xsear commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Shouldn't the json file(s) be removed with this?

This is about the .pinzone.json, .pinchunk.json and .pinasset.json file loaders, and they should all be deleted. Did you spot something I missed?

@eXpl0it3r

Copy link
Copy Markdown
Collaborator

The amount of work that went into this! ❤️

@eXpl0it3r
eXpl0it3r merged commit 1ff8b21 into themeldingwars:master Aug 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants