Possible to save the "state" of a scene?

guru-at-zidwareguru-at-zidware Member Posts: 369
edited November -1 in Working with GS (Mac)
hi...working on this drawing game and would like to save the actors put down. So if you goto the next scene and come back....all the stuff you did is still there? Is this possible? John

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    That is exactly how the previous form of PAUSE worked. Unfortunately, it was yanked by Gendai...
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi John, there's been a few posts over the last few days about this; if you can find them they'll be of help. Basically it involves Load and Save Behaviours. So for each Level, on entering (perhaps in a blank actor off-screen) the Rules would include the Load Behaviour. This would load all attributes that you've saved at the end of the Level, including boolean attributes of whether or not certain actors are there, their positions, etc. Hope that's enough to get you up and running there.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • firemaplegamesfiremaplegames Member Posts: 3,211
    GameSalad used to have a "Preserve Scene" open in the Change Scene behavior, which did exactly what you are talking about.

    Some people used this feature to create things like "shops" in games, where you could leave the play area, purchase upgrades for your weapons, and then return to where you left off. It was also used as a pause mechanism - you could click a pause button, go to a "pause" Scene while preserving the previous one, then click a resume button to go back to where you were.

    quantumsheep used both features in his games, which is why he is very sad that they deprecated it!

    Hopefully at some point they will be able to add back in a similar feature.

    Anyway...

    As far as your situation goes, because it is not an action game, it is easily doable!

    I would achieve it like this:

    Create your Scene to be twice as wide as the screen.

    On the left side would be the drawing canvas, and on the right side would be the tool palette for example.

    You would have a button at the bottom of the canvas side that says "go to tools" or something, and on the tools side, have a button that says "back to canvas".

    Scene Instances have access to the Camera. In the Rules for those buttons, simply change the Camera.Origin.X to either 0 or 480, whichever is appropriate.

    However, if you were attempting to create sort of a "sketchbook" app, with many different pages, all live, all the time, you will definitely run into RAM issues. All those spawned paint daubs add up.

    Saving your creation after you quit the app and being able to recreate it after relaunching it is going to a different matter altogether. I do not think that is possible with GameSalad. ANYTHING is possible, but saving a million X and Y coordinates is a nightmare!
  • guru-at-zidwareguru-at-zidware Member Posts: 369
    hi...yes a great suggestion. I will try it. Thanks! John
  • guru-at-zidwareguru-at-zidware Member Posts: 369
    I will start on the camera origin moving...should take me bout a week to figure out....
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I created a camera tricks demo here:

    http://gamesalad.com/game/play/67610

    Specifically "pan right" should help you.
  • quantumsheepquantumsheep Member Posts: 8,188
    firemaplegames said:
    GameSalad used to have a "Preserve Scene" open in the Change Scene behavior, which did exactly what you are talking about.

    Some people used this feature to create things like "shops" in games, where you could leave the play area, purchase upgrades for your weapons, and then return to where you left off. It was also used as a pause mechanism - you could click a pause button, go to a "pause" Scene while preserving the previous one, then click a resume button to go back to where you were.

    quantumsheep used both features in his games, which is why he is very sad that they deprecated it!

    I decided, quite recently, that I'd like 'Game Over' carved onto my headstone when I'm dead and buried...

    Perhaps with 'He PAUSED just a little too long' underneath ;)

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.