Sorry to get back to this so late, but just to make sure, by saying “don’t modify/access any attached scene stuff” that means I shouldn’t try to access the current scene from the background thread/appstate?
Can I access the background thread/appstate data from the current appstate(s)?
Basically what I’m thinking about is. Since I let users create their own worlds, I wanted to load that into the background, without having to load it from file.
Loading them from file takes a few second to a min+ depending on your computer speed/world size. This laptop is about 5 years old, and when the laptop has been on awhile it’s very slow, and it takes about a min to load the world. After a nice shutdown/restart the laptop runs a bit faster so I’ve noticed about a 10s load or so for the test world. On an Asus desktop we got last year it took about 3 seconds to load the world.
So my plan now is to have a folder pop up with the list of worlds, which each world would be loaded into it’s own appstate through a background thread, or multiple background threads (I haven’t done much Multithreading, and none with JMonkey, so I’m curious if there is any limits to the amount of threads we should load at once, or if there is a “nice number” people like to use, and then just reuse threads when the time comes)?
While that’s going on, a user will be clicking on a world(which will still be loading, or be loaded), and it would show a demo of the world in a side panel/container. If they want that world, they can click yes, and be transported into the world, or else pick a different world.
So for this I would either need to take a screen shot of the world, or show a more advanced demo, going through the world.
I would need to be able to load the finished background appstate into a panel or some sort of container and load the data there.
I’ve seen this done on some Nintendo games, so I would assume this is possible with JMonkey?
Thanks as always pspeed.