Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add revision to the generated navmesh #678

Open
elsid opened this issue Dec 21, 2023 · 1 comment
Open

Add revision to the generated navmesh #678

elsid opened this issue Dec 21, 2023 · 1 comment

Comments

@elsid
Copy link
Contributor

elsid commented Dec 21, 2023

While changes like #657 fix issues with generated navmesh they also change the output for given input so for any caching system it might be a problem to detect such a change. This is a problem because users keep the old revision of the data even if they use newer version of the library and can still get undesired behaviour like crashes until they regenerate it. Would you consider adding a navmesh revision to the generated data and increment it every time there is functional change in the navmesh generation? Also return current revision from a function with stable ABI so it's possible to compare navmesh data revision with currently provided by the library for automatic cache invalidation. Stable ABI is important since on Linux distributions it's possible to have different versions of the library dynamically linked to a binary.

@grahamboree
Copy link
Member

Yeah this is a good idea I think. The original expectation with Recast and Detour was that people integrated it into their own custom engine and systems which handled all this, and the versions provided were mostly an example or to support RecastDemo. That's not universally the case, though, and we've seen some people rely or build on RecastDemo to be their navmesh-authoring tool.

It'd be nice to have versioning in the binary data to handle cases like this. It does also mean we should consider data migration logic for binary data, since people are saving navmeshes in older versions and trying to load them in newer versions.

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

No branches or pull requests

2 participants