Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In game saving #5

Closed
AlmondWhite opened this issue Apr 20, 2019 · 10 comments
Closed

In game saving #5

AlmondWhite opened this issue Apr 20, 2019 · 10 comments

Comments

@AlmondWhite
Copy link

Is there any way of saving your progress in game?

I see no option in the studio itself, is there a method we can add manually to the main script?

@chrismaltby
Copy link
Owner

There’s no option just yet, it’s something I’m looking into though and will probably add with “Save Data” and “Load Data” events.

@AlmondWhite
Copy link
Author

Great news, looking forward to it thanks!

@danielegrattarola
Copy link

+1!!

@chrismaltby
Copy link
Owner

Quick update on this, so the good new is I've added this functionality on develop commit e91af87

I've added four new events:

  • Save Game Data
  • Load Game Data
  • Clear Game Data
  • If Saved Game Data

With those four you can make save points and could make a save game menu scene to load and clear the save data.

Unfortunately though this doesn't seem to be working on the Windows build at the moment where it appears to have an issue setting the player sprite sheet after loading. The sprite is becoming garbled when you load a game.

@AlmondWhite
Copy link
Author

Excellent news, very fast!

save game menu scene

Does this mean we also have the option to create a new form of scene as well or would this be done using the multiple choice option as I would imagine so?

Will do some testing, thanks again!

@chrismaltby
Copy link
Owner

This is working on all platforms with develop commit 070422e.

Does this mean we also have the option to create a new form of scene as well or would this be done using the multiple choice option as I would imagine so?

You'd need to use multiple choice for now (or I've seen a few clever uses of triggers, with hidden players to make menus but that's not ideal). I'm thinking of ways to improve on this though.

@cupOJoseph
Copy link

@chrismaltby is this present in the download on the website, version 1.0.0? Is there another release somewhere? thanks!

@numonkeys
Copy link

GB Studio is awesome, my brother and I have been having a ball over holiday break coding in it. Simple & intuitive & fun to use/play. The web porting especially is great, super-fun to be able to play games on our mobile devices via a simple website.

We've been having issues with the save game data. When we save/load a game, the game data is not the same on load. Multiple playtesters have confirmed this. It doesn't work locally (playing from IDE) or via website (playing over internet).

Should we log a new bug for this? Has anyone else had issues with this?

Thanks for a great tool!

@cupOJoseph
Copy link

@numonkeys what version are you running?

@numonkeys
Copy link

Hi thx for following up so quickly. We were able to debug this issue in our code yesterday. Turns out it was a coding issue.

Specifically (in case anyone else experiences similar issues): on the intro "press start" screen I had set the load game event at the top of the list of events, expecting that it would skip the rest of the events and reload the saved game data and return to the game immediately since it bypassed the "press start" event.

This was not the case. The load game script would run, then the rest of the events would run, causing some of the global variables to get re-written.

Moving the load game event to the bottom of the event list appears to have solved this issue.

Hope this helps.

chrismaltby added a commit that referenced this issue Aug 21, 2020
chrismaltby added a commit that referenced this issue May 26, 2021
…settings to explain their additional uses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants