Playmaker Forum

PlayMaker News => General Discussion => Topic started by: lucaderiu on May 08, 2013, 01:06:12 PM

Title: Save Game
Post by: lucaderiu on May 08, 2013, 01:06:12 PM
It's some days that i'm thinking about "the right" method for saving variables, states and everything necessary to restart the game after a break. Which method you use/prefer?
I'm playing around with various ways and I'm having fun experimenting different solutions for the same problem but I'm curious to know some opinions on your apporach...And what about iOS/Android devices? the challange becomes more difficult I suppose.
Title: Re: Save Game
Post by: jeanfabre on May 09, 2013, 01:58:18 AM
Hi,

 have you tried this:

http://whydoidoit.com/unityserializer/

Bye,

 Jean
Title: Re: Save Game
Post by: VictorRayDev on May 10, 2013, 01:57:28 PM
For my game I utilise playerpref. I save a lot of thing to it. A really good addon to help you is advanced player pref so you can visually understand what you have saved. http://forum.unity3d.com/threads/173779-Advanced-PlayerPrefs-Window-Released (http://forum.unity3d.com/threads/173779-Advanced-PlayerPrefs-Window-Released)
Title: Re: Save Game
Post by: lucaderiu on May 14, 2013, 06:38:24 AM
Thank you for reply. From what i understood there are no native way to store datas  directly from Unity. jeanfabre your suggestion looks compatible with iOS, actually i was just testing something about game save but thanks also to drfantome.
Title: Re: Save Game
Post by: Red on May 20, 2013, 03:59:29 PM
The way i'm saving games is basically using the player prefs to store things which are translated into variables that it understands and also with a set number of save states (since it's not that easy to program playmaker to do things with dynamics like that... i'm sure it's do-able but it's a little out of my depth.)

So, save state will take information strucutured like this.

-character save slot (int)
-player name (string)
-character class ID (int)
-weapon 1-6 upgrade states (so, each weapon has it's own int variables for all three upgrade paths... easier to type this out than listing all permutations for each weapon)
-last level completed (int)

i'm sure there are more than i'm missing but so far PM is pretty handy at interfacing with the player prefs such that making a save system for the game i'm making isn't actually that tough. though, for other game types this might not be the best option since you might want to save a vector3 for the last position the player was on and in that, without referencing Unity, i'd think that you'd have to extract the XYZ coordinates, turn them into floats and then store each float separately.
Title: Re: Save Game
Post by: lucaderiu on May 22, 2013, 08:01:09 AM
thank's Red. I was also taking in consideration Easy Save 2. I saw it in the add-ons of PlayMaker and thought it should be integrated and manageable with FSM. Someone gave it a try?