Switch scene vs. Same scene

gwaheadgwahead Member Posts: 18
edited June 2012 in Working with GS (Mac)
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.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited June 2012

    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

  • gwaheadgwahead Member Posts: 18
    Hi @gyroscope

    Thanks for your answer! Very helpful. I think, maybe, I've gone too far in my effort to reduce the number of scenes :)
  • MobileRocketGamesMobileRocketGames Member Posts: 128
    gwahead that is the most efficient way of doing things. I'm doing the same thing in the game I'm working on. The trick is to encourage, or otherwise have SOME reason why the player should go back to the menu. Maybe break up your levels into worlds, so after every 10 levels it takes them back to the menu and then they have to select the next world, or whatever. In my game the player will constantly be going back to the menu to upgrade, so scene switching will be happening all the time.
  • MetzoPainoMetzoPaino Member Posts: 195
    My app which is in submission at the moment, (fingers crossed), is an endless survival type game and it takes place all on one scene.

    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.
Sign In or Register to comment.