Inspirateur / riverbed

A Minecraft-inspired Bevy game
MIT License
28 stars 1 forks source link

Improve speed of new terrain generation & meshing #2

Closed Inspirateur closed 7 months ago

Inspirateur commented 8 months ago

Currently if the player goes fast enough they can catch up to terrain generation, and the problem is even worse with higher render distances.

To fix this, terrain generation and meshing need to be in separate threads, so they can be decoupled from the game loop and work as fast as possible. Meshing and generation also needs to priorize nearby chunks, which is kind of the case atm but only if the player doesn't move.

Also worth exploring: using DashMap in the chunk storage structure so that generation doesn't require mut.

TODO