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

Tiles are traversed and queued in depth-first order causing shallow tiles to not load when cache is full #428

Open
gkjohnson opened this issue Dec 22, 2023 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@gkjohnson
Copy link
Contributor

image image

Possibly only happening when camera is near or inside a tile? Or on reload of the tileset?

@gkjohnson gkjohnson added the bug Something isn't working label Dec 22, 2023
@gkjohnson gkjohnson added this to the v0.3.22 milestone Dec 22, 2023
@gkjohnson
Copy link
Contributor Author

gkjohnson commented Dec 25, 2023

Necessary settings:

  • target error: 2
  • threshold: 1000
  • side: -Z
  • maxDepth: 9+
  • camera pose: 9, 6, 8

@gkjohnson gkjohnson changed the title Certain settings cause some tiles to not load? Tiles are traversed and queued in depth-first order causing shallow tiles to not load when cache is full Dec 25, 2023
@gkjohnson
Copy link
Contributor Author

gkjohnson commented Dec 25, 2023

The tile isn't being queued because the cache is full. Since tiles are traversed in a depth-first order the children of other tiles fill up the cache first causing the next shallow parent tile to fail to queue.

This is a less likely scenario to encounter if the cache is set up appropriately but two option for avoiding this in a more streamlined manner are to traversed in a breadth-first manner for traversals that queue loads or accumulate tiles that need to be loaded, sort them by priority, and then queue.

It's possible we should queue everything up first, sort, then load

@gkjohnson gkjohnson modified the milestones: v0.3.22, v0.x.x Dec 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant