icexin / gocraft

A Minecraft like game written in go
MIT License
1.88k stars 131 forks source link

Fix stuttering #25

Open min4builder opened 1 year ago

min4builder commented 1 year ago

At least on some machines, there is some stuttering whenever chunks are loaded or blocks are modified. This is because the new chunk mesh is sent synchronously to the main thread, which makes the other threads wait for no reason. This fixes that by moving the few subsequent operations into the asynchronous task as well.

Fixes #18.