Wiki Multithreaded Loading

Hi, I am following the wiki doc here and am trying to implement a multithreaded loading screen. I am using jayfella’s terrainworld github project for a terrain paging system, and there is a method “world.isLoaded()” to check if all the terrain tiles are loaded. The problem is, I am not just loading assets like in the nifty wiki tutorial. In order for the terrain system to check for new tiles it needs to be updated like it normally would (as an appstate). I do not know how to wait in my callable for the terrain to load so that I can then end the thread and end my loading appstate (removing my black texture covering the whole screen and the loading bar). Has anyone encountered a situation like this?

anyone have ideas?

When you have loaded your terrain, set some variable to true. Check it in the other thread, then advance. Really, multithreading is too vast a topic to give you a straight answer here. If you don’t understand how you can achieve what you want to do it might be adviseable to look into some more information on the topic.

1 Like

Thanks, I will read some more about it.