Switch scene vs. Same scene
I have a question for all you GameSaladers!
At the moment I have managed to create a game where all eighty of its levels take place on a single scene. However, during tests with an adhoc build I've found that the longer I play the more glitches occur. I particular I have instances of sounds not triggering at all when they should.
Now, I'm guessing this is because I have a build up of memory use over the course of a game, which is to be expected. However, is the fact that I'm not changing scenes between 'rounds' causing a bigger memory issue than necessary? Would it be better to switch to a different scene and then quickly back to my main scene? I'm suggesting this because I think(?) that GameSalad does a memory dump/refresh between scenes, and I'm further guessing that this will help to assuage some of my memory usage issues?
What do you guys think?
A: Stick to one scene, which never changes, just updates and resets per level.
OR
B: Quickly switch, at end of round, to a different scene (thus causing a memory refresh), then switch back to the main game screen?
All help is greatly appreciated.
At the moment I have managed to create a game where all eighty of its levels take place on a single scene. However, during tests with an adhoc build I've found that the longer I play the more glitches occur. I particular I have instances of sounds not triggering at all when they should.
Now, I'm guessing this is because I have a build up of memory use over the course of a game, which is to be expected. However, is the fact that I'm not changing scenes between 'rounds' causing a bigger memory issue than necessary? Would it be better to switch to a different scene and then quickly back to my main scene? I'm suggesting this because I think(?) that GameSalad does a memory dump/refresh between scenes, and I'm further guessing that this will help to assuage some of my memory usage issues?
What do you guys think?
A: Stick to one scene, which never changes, just updates and resets per level.
OR
B: Quickly switch, at end of round, to a different scene (thus causing a memory refresh), then switch back to the main game screen?
All help is greatly appreciated.
Comments
Hi @gwahead
I guess different users will have different opinions about this. Mine is to to split up your scenes.
As you've discovered, trying to cram every level into one scene - especially 80 levels - is bound to cause some glitches, not to mention possibly having more Rules which you have to wade through, etc,.
Each scene will certainly refresh the memory each time as you say; so, yes, I'd recommend separate scenes - that's what they're there for! You won't find a significant increase in file size either.
A tip for you, if you start from scratch and especially if the levels share the same graphics/HUD/type of gameplay: make your first scene, then duplicate it in the Scenes section on the Home window of GSC (option-drag) for your next levels; this way you only need to amend a few things for the next level.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Thanks for your answer! Very helpful. I think, maybe, I've gone too far in my effort to reduce the number of scenes
I kind of did this to see if I could, but also because I want flowing musical changes which you can't do with a scene change.
I think it worked out in the end, but it caused a lot of weirdness that was hard to fix, especially because I had a vaguely sophisticated menu system. If I was to do it again i'd probably still try and do it all in one scene, it helps me feel just a little more like John Carmack.