Using Different Scenes.

Hello all,

I’ve used Blender as a modeling tool for a while, but I’m new to the Blender Game Engine. I was wondering if someone could answer a couple questions for me:

  1. I’ve seen other projects where the designers have seperate .exe files for each level\scene, why is this so?

  2. If you’re designing a fairly large game, would it be a good idea to use different scenes for separate levels? Is everything loaded when Blender starts, or do they load up seperatly upon loading each new scene?

this is a great question, I am going to be watching this thread…

my biggest problem is shareing data between scenes, like scores, lives,inventory, Etc…

  1. I’ve seen other projects where the designers have seperate .exe files for each level\scene, why is this so?

I guess that’s up to you. I think it’s mainly used as one more division so things don’t get out of hand. Even with scenes, the scripts and actions are all kept in a common location and it can get a little messy if the game is pretty complicated.

  1. If you’re designing a fairly large game, would it be a good idea to use different scenes for separate levels?

Yes. That’s probably one of the most common uses. You can also use overlay scenes which come in handy for text, inventory, huds, or guns in 1st person shooters, and there are background scenes, which get drawn last, so they are a way to reuse data without additional programming. It’s really easy to use one so experiment. All you need is a sensor, an “and” controller and a scene actuator with another scene already made.

Hey fireside, thank’s for the reply! I like the various uses of Scenes, I’ll definitely look more into all of the different types that are available, thanks.

I think it’s mainly used as one more division so things don’t get out of hand. Even with scenes, the scripts and actions are all kept in a common location and it can get a little messy if the game is pretty complicated.
Would using either method make a difference concerning how much memory is used at one time? For instance if you had a 90MB .exe where you used scenes to separate the levels. Would that take up more memory than the same game but with the levels broken into seperate .exe files? Or is the memory not being used until the scene is changed? I’ll check this out more as well, but if someone knows then it’d be a great help :slight_smile:

Thanks again!

This is interesting, because I was recently experimenting with scenes and I found out something bad about blender GE and memory usage withs scenes.

When you switch back and forth between scenes the memory usage keeps going up, up, up!!!:eek:

download Block breaker.blend(my PSP contest entry) here:
http://www.continuousphysics.com/ftp/pub/test/index.php?dir=blender/BulletGameContest/&file=Block%20Breaker.blend

Play the .blend with the task manager open and on the processes tab.
Now switch back and forth from the credits(scene) to the main menu(scene) repeatedly,
see memory usage going up.

This really is too bad, because switching between scenes is a really nice feature.

(windows user- right-click empty space on the blue bar for task manager)
(ubuntu Linux also has graphical(memory usage) program similar to task manager)

It must be not purging the scene memory and then making a duplicate. Someone else posted about this also, I hope it’s been reported.

I cant remember where, but I think I read somewhere that this was caused by a python bug (to do with lists) and that it had been fixed with python 2.41. I’ll try to find a link, or maybe someone else will remember.

Wow that’s just the type of thing that I feared, I’ll look into python 2.41.

Thanks for the replies.