Saving only happens when exiting a room

I want to save some data. But apparently when calling store "myVariable" it will get queued until I exit the room by pulp exits. Using the goto command immediatly after as a workaround does not work.
Any workarounds or bugfixes in progress for this?

Poking at the docs it sounds like that's the expected behavior.

What's your use case? It seems like the only thing you can do with stored data is restore it later... which I'm struggling to figure out when you'd need to do that before the game exists or changes rooms or something?

Personally I've created a fledgling game with just one room that randomly repopulates with traps, walls, etc over time...

To make saving work I have to goto a different room (created only to make saving work) then come back again. Feels... Broken?

1 Like

Aha, so it also stores the data when you exit the game. Then you might have to fix that in the Playdate browser player.

The browser player will not save your data on page refresh. Which is confusing for the following reason.

My usecase is this:

Me: starts game on browser
Me: saves game
Me: refreshes page
Me: data is not saved
Me: confused

While it sounds like if you use an actual playdate it would be:

Me: starts game on Playdate
Me: saves game
Me: quits game
Me: data is saved
Me: me happy

Added feature-request tag. Would be Nice to be able to reproduce closing the game Just like on the Playdate.

2 Likes