Hi.
I had a question and I was wondering if anyone could answer:confused:
I’m starting work on a small game in BGE and I was wondering: if you have multiple scenes, are they ALL always active?
let me clarify: are all scenes always running and always taking up processing power? Do keystrokes register on sensors in ALL layers?
I guess that’s 2 questions, but does anybody have any answers?:spin:
I don’t think all scenes are active at once. Framerates would be dropping like flies. And layers? No. Layers I think have to be active to use up anything. You can however have more than one layer being used at a time. I think layers are mainly used as “inventory”. Like that is where you get your bullets or enemies from, yadda yadda yadda. . .
So can you load and unload scenes in-game? Making a seamless game level that does not load everything at once, but that adds one piece and unloads another one, and therefore the level can be very big?
Well, yeah. You could start out with a scene, like the player’s house, and then when he goes to the door, load up the city outside and end the player’s house (or just switch the house scene to the city scene). You can have several scenes present at a time, but they are either above, or below, the current scene (or others).
If you wanted to actually load sections of a game seamlessly and gradually, you could use logic.LibLoad to load in parts from an external blend file and add them in via scene.addObject or an Add Object actuator.
Hey if you use different scenes for different parts of your world as in solarlunes 1st example. You would have to have your character in each scene. Maybe append the character in each scene you want to use in your world?
@martin.hedin - It might be best to ask this in a separate thread, but each scene should be able to have its own individual camera clipping values. If the scenes were clipped correctly, then yes, each scene could have its own level of detail as well (as each scene begins where the previous scene ends, for example).
The BGE does not know layers (regarding logic). It knows active and inactive game objects. Active game objects are loaded from visible layers while all other objects will be loaded as inactive.