playMaker

Author Topic: Save and Load, what to use?  (Read 2365 times)

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Save and Load, what to use?
« on: May 30, 2019, 08:37:37 AM »
I'm making a Find the Difference game using PM and EasySave. I'm new to both.

I have a scene for each level/set of images and a levels page with all the levels.

I will want to save each completed level and possibly save all right differences until the level is complete, so the player can continue where they left off and not have to start over. Once the level is completed, it will be marked as completed in the levels page, but should be playable again.

I can get it to work using globals, but as I will have hundreds of levels.... well, I understand that globals is not the best idea for this.

So, my question is, what would be the best way to save and load my scenes and variables for this particular kind of game?

I have looked at different options, Send Event, Set/Get FSM, MetaData, Arrays, Hash Tables, EasySave: Save All, Load All and other saves and loads.... What to use??

Arrays and Hash Tables I know absolutely nothing about, oh yes and there's XML too.

It's all going round and round in my head  :o

If someone could please point me in the right direction, I'd be most grateful.

Thanks!
« Last Edit: May 30, 2019, 12:10:47 PM by Maddy »
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Save and Load, what to use?
« Reply #1 on: May 30, 2019, 06:54:33 PM »
Hi.
I think arrays is a good way to go, but you might want to use array Maker instead of standard arrays. you can find load save action on the Ecostystem for Array Maker, to use with Easy Save.

You should have a bool array for "Completed" and a bool array for each differences
So if there would be 10 differences you would need 10 arrays for them.

when player starts the game you should test if a save exists and if there is not, you should save all the arrays default state (for when the player starts the game the first time)

Then when you load a level, you should load the arrays and check which differences have been found (so you can indicate that they are found)

Then when player finds a difference, update the corresponding array.

Then when level ends (and on application quit if required) , save the arrays

For each level you can use the 'index nr' to get the info if completed and which differences has been found.
Arrays start @ index 0 so level 1 would be index 0, level 2 index 1 etc.


Here is a video about array maker :


« Last Edit: May 31, 2019, 07:06:15 AM by jeanfabre »

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Save and Load, what to use?
« Reply #2 on: May 31, 2019, 04:19:48 AM »
Thanks for the quick reply djaydino! I'm going to watch some videos and play around with it and then I'll most probably be back with a couple of follow-up questions.
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Save and Load, what to use?
« Reply #3 on: May 31, 2019, 02:10:02 PM »
This is going to be tricky. I understand what djaydino says, it all makes sense, theoretically at least. It's arrays that I find a bit tricky. I have added Arraymaker.

So the arrays I will use are:

Array List Create?
ES3 Arraylist Save?
ES3 Arraylist Load?

And I will put the Save and Load lists in a game manager in each scene, where I keep all the clicks and points? And all 3 on the start/menu page?

There are Save Bool Array & Load Bool Array in EasySave2, is that what I should use?  Can I use both ES3 and ES2 in the same project/scene?

Thanks for any help or tips!

Maddy
« Last Edit: June 02, 2019, 05:31:44 PM by Maddy »
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Save and Load, what to use?
« Reply #4 on: May 31, 2019, 04:23:23 PM »
Hi.
Not sure if es3 and es2 can be used at the same time.

but yes, save bool array and load bool array

an advantage with array maker is that it uses references.

So if you use the same difference names for each level (for example Difference 1, Difference 2, etc.

Then you can use this by getting the name, and use the same name for the references on the arrays.

Array list create should not be used in your case i think,
its better to have the arrays preset already.

Now you can also use a object and use the action Don't destroy on load
and place the arrays there. then when you load another level the object will stay, so you can reference easier, instead of loading/saving each level.

But it will also work without doing this

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Save and Load, what to use?
« Reply #5 on: June 01, 2019, 01:26:45 PM »
Djaydino, thanks again for all your help and your really good explanations. I'm starting to get a miniscule grasp on arrays  ;D from videos and the Moodkie website too.

It seems to me that I should use Save/Load Bool Array for Differences and Completed Levels.

Save/Load Bool (without Array) plus Exists, to check if there is a save/defaultFile when the player starts the game and quits.

I'm going to read up a bit more on arrays and try a few things and then I'm sure I'll be back.

Edit: I really would like to use ES3 + Arraymaker if needed, so that I won't have to change the save system down the line. I'm going to see if I can get that to work and understand it.
« Last Edit: June 01, 2019, 05:49:56 PM by Maddy »
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Save and Load, what to use?
« Reply #6 on: June 03, 2019, 11:04:11 AM »
Hi.
I believe the arraymaker save actions are for es3



Did you get these from the Ecosystem?

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Save and Load, what to use?
« Reply #7 on: June 03, 2019, 05:15:06 PM »
Yes I did thanks. I think I might have done some progress and started to understand a little bit more about arrays. Tomorrow I'll post how I think I'm going to set it up and I'll also have a few questions about that, because there's some things I'm unclear about.

Arrays on the whole just seem to be so abstract. I think it's because I can't see them. I can see events, variables, game objects etc but no arrays. They just exist.... somewhere.

Anyway, I'll be back tomorrow  ;D Thanks again djaydino!
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Save and Load, what to use?
« Reply #8 on: June 04, 2019, 07:48:39 AM »
I now realize that you meant for me to use the different Array List Actions and ES3 Array List Save & Load, at least that's what I think.

I had set it up to use simple Save and Load Actions from ES3, to use with Differences, Levels and Game Progress (Global Var), using Array Variables which are bools. And then do the Exists? and Save and Load in the menu page. There were settings in the Load Action, that I wasn't quite sure of, maybe that's why I couldn't quite get it to work, it saved but didn't load.

Anyway, now I'm going to try Array Lists... Now that I have looked at it a little, it's starting to make sense.
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Save and Load, what to use?
« Reply #9 on: June 04, 2019, 05:35:50 PM »
Hi.
The exists is mainly for when the player plays the game for the 1st time.

Because if you try to load and there is nothing saved yet, i will get errors.

Maddy

  • Playmaker Newbie
  • *
  • Posts: 34
Re: Save and Load, what to use?
« Reply #10 on: June 05, 2019, 01:55:33 AM »
Yes that's what I meant, maybe I wrote it a bit funny.  :)
I'm an artist with poor memory and brain fog trying to make a game. Please wish me luck! :-D

jjchun

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Save and Load, what to use?
« Reply #11 on: May 05, 2022, 12:28:13 PM »
Hi

Is is possible to save and load to web with ES3 cloud action?

If possible, it will be great

Many thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Save and Load, what to use?
« Reply #12 on: May 05, 2022, 05:43:47 PM »
Hi.
I thinks so.
But to be sure, you should ask on moodkie's forum
Since he made the actions himself for his asset :)