Tommek Posted September 8, 2014 Share Posted September 8, 2014 Hi, as sometimes levels take a while to generate I would like to show some progressbar or a moving icon to the player. Currently the game window just freezes. Any ideas? regards, Tommek Quote Link to comment Share on other sites More sharing options...
Rick Posted September 8, 2014 Share Posted September 8, 2014 I think you are hosed a little with this one because when you call Map:Load() LE loads all entities behind the scenes and we don't seem to have any control while it does this. I think you were making the LOD system right? You might want to consider placing the lowest LOD in the editor, but somehow linking the higher ones in a way that you load them after Map:Load() so that you have more control over loading 1 at a time while you update a loading bar. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted September 8, 2014 Share Posted September 8, 2014 I assume from Rick's response that the Load hook isn't exposed in Lua. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510 This may be the push you needed to get the C++ version. Or the push you needed to push Josh to expose it, ha. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 8, 2014 Share Posted September 8, 2014 Lua has a loadmap callback too. http://leadwerks.wikidot.com/wiki:entityindexer The point Rick describes is that Maploading is not multithreaded in such a way so that we can request the loading progress to display a loading bar. 1 Quote Link to comment Share on other sites More sharing options...
Rick Posted September 8, 2014 Share Posted September 8, 2014 Oh that may work. I didn't notice that. Do you know if that gets called after each entity is loaded, or does it get called at the end for each entity that did get loaded? Guessing this would be more of a back and forth sort of bar instead of an actual entity count sort of bar. OP, Note you'll have to call the drawing stuff of the context then to update it to the screen. You can't rely on the existing main loop that does this as that part never gets called during Map:Load(). Quote Link to comment Share on other sites More sharing options...
Tommek Posted September 8, 2014 Author Share Posted September 8, 2014 Thanks for the Input! I've got some ideas for the indexer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.