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

Improve generateChunks option vs missingChunk event #5

Open
deathcap opened this issue Jan 20, 2016 · 0 comments
Open

Improve generateChunks option vs missingChunk event #5

deathcap opened this issue Jan 20, 2016 · 0 comments

Comments

@deathcap
Copy link
Member

If generateChunks is true (and it is by default), then the engine will generate chunks itself, synchronously, through opts.generate

The alternative asynchronous chunk generation technique is to listen for missingChunk events, generate asynchronously, then call showChunk when finished. If this technique is used with generateChunks: true, there is a confusing failure case: the initial chunks generate, but then no new chunks as the player explores. Found in voxel/voxel-example#9

The correct configuration is to set generateChunks: false when using missingChunk/showChunk. This is now documented in voxel-flatland and voxel-land but maybe it could be improved further. Perhaps remove generateChunks and always require listening for missingChunk events? Or have the plugins detect and fail if the option is not set. Or/and get synchronous chunk gen to work again (worked in the three.js-based voxel-engine), so the conflicting chunks won't be empty.

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

No branches or pull requests

1 participant