Scene Change: Set, Remove?

Hello all,

I’m making my first game in Blender 2.65 and it’s just about done.

Right now I’m mostly optimizing to try to get it to run a bit more smoothly. One thing I’ve noticed is that when I run my individual scenes on their own, they run great, rock solid (mostly) 60 fps. When I run them in sequence - as the game is intended to be played - the frame rate drops the longer I play. Nothing in this game is particularly demanding, there’s no textures to speak of and not a whole lot on the screen. Some of the dynamic lighting is probably a bit hard on the ol’ gpu.

My question has to do with the scene actuator. Does “Set Scene” remove all other scenes, even suspended ones and/or ones in the background? I have a few transitions where a scene pops up over a suspended scene and then sets a new one. I think maybe something from those bits are leaking into subsequent scenes or something.

It probably doesn’t help that when I started this thing I only had a vague idea of what I was doing and much of my logic and scripting is a jumbled mess.

I’m posting late at night and won’t get back to this thread until tomorrow. Prior thanks for any advice/insight anyone can offer.

The Set Scene actuator should change between scenes, loading and unloading data as necessary. As far as I know, each scene occupies a slot. Any scenes you add display either on top of or beneath this one, and if you switch one of those other scenes, it will swap out the scene in that layer, or slot, for the one you specify. However, adding scenes, like you mentioned, won’t remove the other ones. You have to use the Scene / Remove actuator to remove scenes.

Ahh, so the suspended scenes are clogging up the background. Thanks! I had tried removing them before, but it started crashing my game when I started removing suspended scenes, I’ll just have to find a way around it. Probably resume them a logic tic before.

Implemented and running better than ever. Thanks!