klepto2 Posted February 15, 2010 Share Posted February 15, 2010 I'm currently working on my loading and setup routines and I think it may be useful to have some kind of callback for the LoadScene function. Currently my scene is relatively small and small splashscreen is enough for indicating loading. But i if the scene files grow and the loading of a scene takes much longer i would like to present progress on my loading screen. Maybe you can add a callback as an optional parameter to the loadscene function: main_scene = LoadScene("abstract::map_x_1_y_2.sbx", LoaderProgress) Function LoaderProgress(progress:TSceneProgress) DrawImage(splash, 512.0 - loadimg.Width() / 2.0, (768.0 / 2.0) - (loadimg.Height() / 2.0)) Local total:Int = progress.GetTotalItems() Local loaded:Int = progress.GetLoadedItems() DrawText "Loading... " + (loaded / Float(total)) * 100 + "%",20,20 Flip() End Function Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Rick Posted February 15, 2010 Share Posted February 15, 2010 I agree. This would be a nice feature and probably pretty easy to implement. Quote Link to comment Share on other sites More sharing options...
Niosop Posted February 15, 2010 Share Posted February 15, 2010 Pretty easy for us to implement ourselves by creating our own scene loader. You'd probably be best served by loading the terrain/vegetation using the standard LoadScene command, then using your own loader to load the individual items one at a time so you could track status. At least it's a temporary solution until Josh adds this in, if he does. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Rick Posted February 15, 2010 Share Posted February 15, 2010 How would you use the LoadScene() to only load terrain/vegetation but then load all the other things yourself? LoadScene() is going to load anything in the sbx file. So the only way I can see this happening is to parse out the terrain and vegetation from the sbx file you want to load, then use LoadScene() on the new sbx file which just has the terrain and vegetation, and then create our own loading function to parse out the original sbx file. That's a pretty big hack. It gets old having to hack stuff like this. By "big hack", I mean anytime you have to start manipulating files on disk like this it's a "big hack". Not in the amount of code it takes, but in how crappy of a solution it would be vs the engine just having it. This would be such an easy feature to put into the engine vs the time it would take for us to do it. Quote Link to comment Share on other sites More sharing options...
L B Posted February 16, 2010 Share Posted February 16, 2010 +1 on this one. 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.