playMaker

Author Topic: playmaker slot saving and loading system  (Read 1980 times)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
playmaker slot saving and loading system
« on: September 01, 2022, 05:11:38 PM »
A six-slot saving and loading example using the playmaker Json Save and Json Load actions.

I plan to release this example for a reasonable fee and include a pdf file with further details.

Here is a short video clip:
Each black cube represents a savepoint; in the example, you press the "E" key to activate saving.

To Load, you press the "Return" key, but only the previously saved slots are available to load.

The demo video shows four available saving locations, but that's just one possibility as you could just use one save point and use different save slots!

The example video uses the "E" key to leave the level.

Features of the saving and loading system include:

scalable saving and loading:

https://i.postimg.cc/SxS0m85Y/Scalable-slot-saving-and-loading.png

Mouse icon control.

The saving and loading are configured to also use an Xbox joystick.

The Player's input is stopped while UI elements are on screen.

Timescale is now also controlled while the UI elements are on screen. If a UI element is open/onscreen the timescale is set to zero and when closed timescale is returned to normal time.

If you choose not to save but leave the level your health is auto-saved so that you can reach a new level with current health values.

A scene arrival takes care of loading your health.

A leave scene option to load a different level is also available.

The title scene can be enabled or disabled within specific scenes.

pickup spawning mechanic

Enemy spawning mechanic with an option to show or hide the dead body.

Ability to reanimate the enemies press the spacebar key to bring them back to life.

Assuming that you would need to test a lot before you publish or build your game.

The structure is setup to use a .prototyping filename within the startup.

Simply disable the set fsm int within the "startup" FSM action state "setup finished" for your final build.
« Last Edit: September 11, 2022, 04:46:25 PM by colpolstudios »

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: playmaker slot saving and loading system
« Reply #1 on: September 01, 2022, 05:18:58 PM »
What is needed is the added action to delete the Json files to complete the ease of use, maybe a coder is out there that could create such an action?

Please add your comments or suggestions these will impact additions or changes thankyou.

« Last Edit: September 01, 2022, 05:24:56 PM by colpolstudios »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: playmaker slot saving and loading system
« Reply #2 on: September 02, 2022, 01:44:51 PM »
Hi.
this should be able to delete files (attachment below)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: playmaker slot saving and loading system
« Reply #3 on: September 02, 2022, 03:42:23 PM »
Hi djaydino, the actions use the Application.persistentDataPath + "/" + filename.Value

Can you adapt your example, please?

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: playmaker slot saving and loading system
« Reply #4 on: September 03, 2022, 10:33:44 AM »
Hi djaydino,

After a careful review of the saving system, a Json Delete action may be too much hassle for the user and giving instructions on how to find and delete all the saved files would be much easier.

Once you see the saving and loading system you will understand it better.

In that regard, I wish to request a tester for the system. The end files will be free so the only reward will be to be a part of a unique slot-saving system.

If interested PM me for the files this is open to all playmaker users.

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: playmaker slot saving and loading system
« Reply #5 on: September 06, 2022, 05:10:58 PM »
a short video showing the pickup and enemy spawning mechanics


Player prefs are used

Included is a reset player prefs to allow the user to reset all the player prefs.

The enemy has the ability to reanimate and come back to life, the example uses the "spacebar" key to reanimate the dead enemy.

You can enable or disable this option.

« Last Edit: September 06, 2022, 05:19:08 PM by colpolstudios »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: playmaker slot saving and loading system
« Reply #6 on: September 07, 2022, 01:16:51 AM »
Hi.
Are you resetting all player prefs or only player prefs you are using?

As many other asset uses playerprefs, including editor setting for assets.

Also player prefs are very easy to edit (cheat) , unless you encrypt/decrypt and store encrypted strings :)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: playmaker slot saving and loading system
« Reply #7 on: September 07, 2022, 08:28:23 AM »
Hi djaydino,

only the ID-specific string name is reset; the bool variable is set to false in the reset object.

But in order to reset you have to enable the enemy or the pickup and disable the spawner mechanics. Then activate the Reset and run the frame now uncheck the Reset.

Now disable the enemy or pickup and re-enable the spawner mechanics.

The video does show this process, maybe with your experience, you might have a better solution.

I did try to use the Json save and load, but that will not work. You get a file-sharing error!

The player prefs work perfectly but you mention encrypting/decrypting and storing encrypted strings could you give me an example of how to do this, please?





djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: playmaker slot saving and loading system
« Reply #8 on: September 08, 2022, 01:40:54 AM »
Hi.
You need to create some kind of encryption generator to change your save date to a string and vise versa.

But i don't really know how to do so.

I always use Easy save on all my projects

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: playmaker slot saving and loading system
« Reply #9 on: September 09, 2022, 03:54:41 PM »
updated pickup and enemy mechanics.

Using the Json save and Json Load actions and arrays


@ 1.29 I use the spacebar to reanimate the enemies.

Any current enemy who was dead is now alive! and can be killed again.

Once you save in any slot a SAVE global is sent out to the pickups & enemies.

Loading of the pickups and enemies is done in a similar way with a load Global.

Note: I don't just save the enemies' dead state I also save their position and health.

« Last Edit: September 09, 2022, 04:12:21 PM by colpolstudios »