-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Improve tilemap performance by using quadrants only for rendering #74603
Conversation
If I read this pr correctly you are removing the quadrant entirely for everything that is not rendering. I am not convinced that this is a good idea. While this may mitigate some performance cost for updating single cells it also basically voiding chances of fixing physics collision and navigation mesh performance and quality issues. Those issues are not the result of quadrant update costs but from having so many splintered and small cells in the first place. For merging collision and navigation polygons an in-between update unit like quadrants is still needed. |
The idea would be to reintroduce per-system quadrants where needed. We can easily add some |
Guess that is fine too. Does not have to be this pr but could you add those navigation "quadrants" as you see fit in a draft / pr. I added the navigation polygon merging for TileMap quadrants in the NavigationMeshGenerator rework expecting the quadrants to be available, now I dont know how to remake that part with them removed. |
Yeah, sounds good! Once this one gets merged, I'll open a branch adding those other quadrant types, I guess you may rebase your work on top of it or something like that. |
2fe1cee
to
341c62b
Compare
Whats the status on this one? Will it be added on the next patch? Im the one opened this #72405 and im struggling bad with crashes/freezes all the time. |
I don't think so, it needs a lot of work and I lack time to do so. Maybe someone could help but that's a difficult problem to solve. |
thats unfortunate. Tiled just got an exporter for godot 4, i'll have to check that one out. |
341c62b
to
c67e477
Compare
I'll close this PR and open a new one, the changes are a bit different now and need more explanations. |
This PR is a huge refactor of the TileMap internals. It makes it so any update does not have to update a full quadrant for all systems (physics, navigation, etc...) but only for the rendering part. It should help significantly reduce the slowdowns in the editor.
This PR does not do it right now, but we could probably revert what does: #67330. This would simplify the code a bit, and since a cell would only be modified if it was actually changed, the original issue would still be solved.
To be tested, but it should close #72405