How do I efficiently generate chunks to fill entire screen when my player moves?
- by Trixmix
In my game I generate chunks when the player moves. The chunks are all generated on the fly, but currently I just created a simple flat 8X8 floor. What happens is that when he moves to a new chunk the chunk in the direction of the player gets generated and its neighboring chunks.
This is not efficient because the generator does not fill the entire screen. I did try to use recursion but its not as fast as I would like it to be.
My question is what would be an efficient way of doing so? How does minecraft do so?
When I say this I mean just the way it PICKS which chunks to generate and in what order. Not how they generate or how they are saved in regions, just the order/way it generates them.
I just want to know what is a good way to load chunks around the player.