playMaker

Author Topic: Save Games: The Theory Of  (Read 4341 times)

N00basaurus

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Save Games: The Theory Of
« on: June 01, 2015, 01:31:01 AM »
Hi!

I've been working about in Playmaker for the past few months and I really love the system.  I'm not that great at waggling code about, so this is perfect for me!

I've been good at figuring most things out, but as I get into developing more complicated games and games that have stories within them, I now come to something I haven't quite figured out yet.

How would you save progress in non abstract games?  The project that I'm thinking about tackling next is a point and click adventure or a text based adventure, or something story driven like that... but I'm not entirely sure how to "save" progress on the back end.

I get that some game saves would be "levels", but how would you save things like "who the player talked to" or "what items the player currently carries" from the time the player shuts the game down and turns it back on again?

I guess I could do something with global variables.  Like, did the player obtain the sodaCan: True/False and then some how export and import those global values upon game start... Though if I want, for instance, to have branching dialogues that change throughout the game depending on how the player responds to them, how would I make sure that the player does not get text intended for different chosen paths if they turn off the game and then restart it?

I've searched about the forums and found some topics on "serializing" data, but I'm not entirely sure what that means exactly and how that relates to the actual save of data... or rather what data is saved to a file and how does it pull that data back out when the game restarts.  That and the links to the videos, add-ons, and everything else that is a hyperlink is dead...

Anyways, I know this is a bit of a chunk and probably answered over and over, but I'm just kind of curious on how this all works.

Thanks for any information anyone is able to provide,

Sincerely,

N00basaurus

flora

  • Playmaker Newbie
  • *
  • Posts: 47
    • View Profile
Re: Save Games: The Theory Of
« Reply #1 on: June 01, 2015, 06:45:07 AM »

hello  :)

i am on the same boat than you on this one .. i am quite curious too how it all works.
in the meantime, have you check this ?
https://www.assetstore.unity3d.com/en/#!/content/768

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Save Games: The Theory Of
« Reply #2 on: June 01, 2015, 07:02:32 AM »
Use this:

https://www.assetstore.unity3d.com/en/#!/content/3675
https://hutonggames.fogbugz.com/default.asp?W714  -- Unity Serializer

It has playmaker actions..

Never used it but if i had to create a detailed save, I would start with this.

N00basaurus

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Save Games: The Theory Of
« Reply #3 on: June 01, 2015, 12:37:22 PM »

hello  :)

i am on the same boat than you on this one .. i am quite curious too how it all works.
in the meantime, have you check this ?
https://www.assetstore.unity3d.com/en/#!/content/768
Use this:

https://www.assetstore.unity3d.com/en/#!/content/3675
https://hutonggames.fogbugz.com/default.asp?W714  -- Unity Serializer

It has playmaker actions..

Never used it but if i had to create a detailed save, I would start with this.

After looking through reviews on the asset store, I did end up picking the Easy Save 2 asset.

I'm still a little confused on the basic functionality of game saves.  Specifically "What is as serializer as it pertains to game objects" as well as "what is serialization's relationship to game saving".  I know they are very basic questions, but I'm kind of new to the field of game development.

mdotstrange

  • Hero Member
  • *****
  • Posts: 552
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Save Games: The Theory Of
« Reply #4 on: June 02, 2015, 01:21:16 AM »
I made my own saving options for things like weapons held- achievements unlocked using playerpref bools- so when the item was picked up etc it would write that to a playerprefs bool for that item- then when the game launched it would check the playerprefs and enable items etc-

It worked but was pretty tedious-

I've never used Easy Save but looking at the doc's it seems like it would be pretty easy if you had a game object with the fsm/fsm's managing this stuff or had global var's managing them then you could just use this easy save action "save all" to do the work for you-
http://puu.sh/i9pQF.png
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

N00basaurus

  • Playmaker Newbie
  • *
  • Posts: 8
    • View Profile
Re: Save Games: The Theory Of
« Reply #5 on: June 09, 2015, 04:03:23 PM »
I made my own saving options for things like weapons held- achievements unlocked using playerpref bools- so when the item was picked up etc it would write that to a playerprefs bool for that item- then when the game launched it would check the playerprefs and enable items etc-

It worked but was pretty tedious-

I've never used Easy Save but looking at the doc's it seems like it would be pretty easy if you had a game object with the fsm/fsm's managing this stuff or had global var's managing them then you could just use this easy save action "save all" to do the work for you-
http://puu.sh/i9pQF.png

How did you go about saving the bool values out side of the currently running game to be checked later? Were the values in the export function in playmaker?

mdotstrange

  • Hero Member
  • *****
  • Posts: 552
    • View Profile
    • Can't code? Who cares! Make games anyway!
Re: Save Games: The Theory Of
« Reply #6 on: June 09, 2015, 04:44:08 PM »
I did so using "Playerprefs" they are like a preference file that gets stored on a players pc that you can read/write variables too-

Playmaker has built in actions to deal with playerprefs- and you can extend them with this free package https://hutonggames.fogbugz.com/default.asp?W1118
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

rik

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Re: Save Games: The Theory Of
« Reply #7 on: June 10, 2015, 12:54:48 AM »
use easy save or player prefes it will save and load all types of variables so you can store and retrieve the data but in my tests it was slow, use easy save it was more advanced and secure and all in one good luck

dudebxl

  • Hero Member
  • *****
  • Posts: 602
    • View Profile
Re: Save Games: The Theory Of
« Reply #8 on: June 10, 2015, 07:08:39 AM »
.. and the actions to secure playerprefs are available in this forum - from simple hash test (md5) to a more complex encryption. So if you need to protect a small amount of data, no need for the extra plugins etc.  :D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5396
    • View Profile
    • jinxtergames
Re: Save Games: The Theory Of
« Reply #9 on: June 11, 2015, 08:47:45 AM »
maybe an idea is to look into ArrayMaker/Hashtables

for saving and managing your items...and they can be saved in easy save 2.

i just started using it and its very good. i have 100+ items to manage and HashTables is ideal for it.

you can find it here and some tutorials here
On tutorial 4 you have a little about hashtable.

Greetings Dino
« Last Edit: June 11, 2015, 08:57:37 AM by djaydino »