World Generation on seperate thread.
#1
What would it take to move the world generation and possibly loading onto a separate thread. I don't notice any lag with loading already generated chunks, but chunk generation certainly causes noticeable lag with more than one person on the server.

I'd imagine the lag would be unbearable with 10+ people on a new server.

I'm not familiar enough with the code to make a change like this yet, but I feel this is an important thing to do.
Reply
Thanks given by:
#2
Terrain can be generated by multiple jobs in seperate threads and it would be faster, I'm not sure how much faster it would be though, since multiple threads would be working on the same single chunk (which is pretty small anyway).

If you want to completely generate chunks independently from the gameplay thread you'll be facing quite some trouble. If I want to access a chunk I expect a result right away, but if you generate it on a seperate thread you more or less request to access the chunk and if it's not generated yet it'll say (right away) try again laterTongue This might cause quite some trouble, I'm not sure XD
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)