Replace .json based zone loading with direct parsing. - #71
Merged
Conversation
Adds CollisionGenerator tool for pregenerating cache. The server will wait for the zone to finish loading before starting simulation and accepting connections.
Contributor
|
Shouldn't the json file(s) be removed with this? |
Contributor
Author
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
approved these changes
Aug 19, 2026
Collaborator
|
The amount of work that went into this! ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.