joshmarinacci / voxeljs-next

The next generation of Voxel JS
https://vr.josh.earth/voxeljs-next/examples/ecsy.html
BSD 3-Clause "New" or "Revised" License
147 stars 20 forks source link

make chunk creation lazier #13

Open joshmarinacci opened 5 years ago

joshmarinacci commented 5 years ago

Right now when the player moves forward across a chunk boundary it will trigger the creation of a bunch of new chunks to fill in the world. Currently the system will have to wait until those chunks are all completely created before continuing with rendering. This could easily take more than a single frame.

Instead chunk creation should be lazier. It should issue a request for new chunks but assume that they could take a while to come in (perhaps data from a server?). Further more it should allow some chunks to come in before others. Push a chunk into the screen when it is ready, don't wait for all of the new chunks to be available.