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

Generation might need contextual information #12

Open
rom1504 opened this issue Oct 8, 2015 · 1 comment
Open

Generation might need contextual information #12

rom1504 opened this issue Oct 8, 2015 · 1 comment

Comments

@rom1504
Copy link
Member

rom1504 commented Oct 8, 2015

For example it might need to be able to generate 2x2 chunks to place a tree between 2 chunks.

In order to do that I propose to switch from a generation function being (chunkX,chunkZ) -> chunk to (world,chunkX,chunkZ) -> promise

That way the generation function would just add whatever it needs (and query whatever it needs) before saying "I'm done".

It would be a "make sure that chunk is ready" function instead of being a "give me that chunk" function

@rom1504
Copy link
Member Author

rom1504 commented Oct 8, 2015

Apparently the "place a tree between 2 chunks" is done in a population second phase. Maybe it would make sense to do that in a second time us too, I don't know. It would be a good idea only if performance requires it, right now it doesn't.

For now, the generation will probably stay as it is.

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