Adventure games with inventory + game saves?

gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
edited November -1 in Working with GS (Mac)
Hi, I know I'm trying to "run before I can walk", i.e I've only been using GS for a couple of hours, but I'm interested to know, for a future project, whether it's possible to a) create an adventure game to include a workable inventory and b) to include saves in-game, so that if iPhone/iPad was switched off, then game on again, the user could carry on were they left off.

If either or both of these are possible, any pointers would be appreciated thanks - i.e things to look out for while I'm learning.

:-)

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

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Learn to crawl! :)

    Actually, having an inventory is very doable. Basically you will create a boolean attribute for each item. Then you'll have a rule that says

    when game.pickaxeunlocked is true
    ----------change self.alpha to 1 (makes the pick axe button visible)

    etc.... (there's a few more steps, but that's the idea)

    Saving-

    Having the game save exactly where you have left on may be tough. You could put save behaviors for things like the score, time, player location (X and Y), etc. in a timer so that it is being saved on a regular bases but this may hurt your game's FPS. A compromise would be to have checkpoints at various points in the level. So in that since it is very doable in GS

    Good luck and welcome to the community!
  • quantumsheepquantumsheep Member Posts: 8,188
    As a side note, save games only work when you test on a device. Don't panic if you're testing it in the GS Preview mode and it doesn't work!

    Good luck!

    QS :D

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

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    scitunes said:
    Learn to crawl! :)

    Ha scitunes, yes, agreed! :)

    Good news that inventories are doable, as well as checkpoint saves. I wonder where this info is stored? i.e for a desktop mac it's probably be in a .plist file or a .prefs file, I think I'm correct in saying? I guess the iPhone + iPad would save in a seperate file that's similar?

    Thanks to you, as well as quantumsheep, for your info.

    :-)

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

  • RHRH Member Posts: 1,079
    Adding to what scitunes said, it wouldn't be hard to have a save button so that when it is clicked it would save all the attributes you need to save. I imagine this would be better for FPS than having a timer.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sounds good RH, thanks. I guess the behaviours to use would be Load Attribute and Save Attribute; I can't see anything else that would be applicable to saving parameters/variables. The note says these are for values loaded and stored in persistent storage, although I'm still not clear whether this "memory"/variable storage is persistent only while the game app is running, or when it's quit and reopened. and if it's the latter, I'm still curious how the iPhone/iPad would store that info outside of the program.

    Has anyone successfully applied a Save system to their game, the user able to go to a saved level for instance, when running the app again?

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

  • chosenonestudioschosenonestudios Member Posts: 1,714
    Yes the load and save attributes can be used to save files (even after the game is closed)

    I haven't personally had a saver that saves what level your on, but my games save your highest score and all your settings!

    I'm not exactly sure where it writes the information, but I believe it works basically the same way as other apps and everything thats saved has to go to a certain file... Because when your updating your game EVERYTHING goes away except for your save files...

    Hope this answers your question!

    Good Luck! :D
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    chosenonestudios said:
    Yes the load and save attributes can be used to save files (even after the game is closed)

    I haven't personally had a saver that saves what level your on, but my games save your highest score and all your settings!

    Excellent news, chosenonestudios! When I'm ready to implement that, I hope I would have found an example or sussed it in practice myself. Certainly answers my question, thank you!

    :-)

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

  • chosenonestudioschosenonestudios Member Posts: 1,714
    gyroscope said:
    Certainly answers my question, thank you!

    :-)

    Yep, No Prob :D
  • tamer1tamer1 Member Posts: 11
    ROFL
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    tamer1 said:
    ROFL

    Mind your dung in your straw.

    ----------------------------------------
    (A pointless insult, I know; but promoted by this guy's insults and ranting in another thread).

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

  • RHRH Member Posts: 1,079
    tamer1 said:
    ROFL

    Same person as ensa? I may be jumping to conclusions.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    tamer1 said:
    ROFL

    huh?

    I guess I'm getting old :)
Sign In or Register to comment.