Saving update

I made a small update tonight to deploy the new “save” behavior. It has one property, and two inputs.

The only property is “name”, and this is the location where the value is saved and read from.

The inputs are “save” and “read”. If you send a value into the “save” input, it will be saved to the players local storage. If you trigger the “read” input, the local value will be read from storage and sent to the output.

The value can only be read by the player that stored it, so two players cannot see each others saved values.

Use caution: saving and reading values is not very fast, so take care where you use it so that it does not add lag to your games.

Very simple example:

Have fun, and post below if you have questions :slight_smile:

I’m not finding it :neutral: But I’m super happy for this update :smiley: will the saving eventually get faster and not cause lag

Hell yeah!!!You call this a SMALL update?!?This is awesome!Thanks so much for making this!

Well, it’s “small” because it’s only a single thing that changed :slight_smile:

ztg5 - it’s in “Game Flow”. Maybe that’s not the best section, but that’s where I put it for now.

To clarify - saving and reading are only slow in a relative sense, compared to most other behaviors. The way you could cause lag would be to maybe save or read values on every frame - if you just save and read values when you need them, it won’t have any adverse affects.


So i made a save console in hyper survival corruption, and its an object in the UI that transverses through levels. When clicked, it emits a sound and ‘saves’ and when the L button is pressed or the load button on the title screen is clicked, it doesnt want to work?

I dont get it

Can it be possible to save block positions, and does it still remember after refreshing?

I removed it after looking at the example

Ok, i found out how it works. You can give a name to a number, and in a different spot, you can use that same number. So you can make a calculator now… Sorta

Can I Save My Game Before
I Finshed The Level.

jngthree - to save and restore the position (x and y properties) of an object you would do this:

connect a trigger to an extractor behavior, and extract the “x” property of your object. Send this to “save” input of a save behavior and name it “x”. Now do the same thing for the “y” property.

Now the position of your object will be stored whenever the trigger fires.

To restore the position on start, connect a once trigger to the “read” input of those save behaviors, then send those values into the x & y inputs of a “position” behavior.

I found that out. But i originally wanted to where one session’s progress carries over to the next. Guess thats not happening anytime soon…

Well, you can pretty easily save the current level and restart at that level, and save/restore the players score and health - is there something specific you wanted to save that can’t be?

if you were to refresh the page, would it stay?

and could there be a “global save” for high scores?

It does stay!!!
I noted that in my game, because it counts your seconds, i made it to where it saves the score right after the score update, so it saves after the second passes, so it can show on the game over screen, and even then there are about 6 different save commands used and only two separate variables… It stayed at a solid 30 FPS. The high score thing isnt working unless you turn on the editor on and off… I dont exactly know why, but…

So, made a small game and used the save command.
It keeps track of your personal best, and the score from the previous game…
The game itself is harder than it looks, my high-score is 83
Can you top it??

Play it for yourself here

I added another kid to make it harder.
And i made a double check system to counteract the non best remembering glitch… It should be fine now.

I’ve got to use this in my raining chocolate game!

@grazer, in order to advance, there has to be certain criteria, and the character is keep on level restart, so traversing through areas is not as easy