Creating a savable game

I’ll make this simple and easy. I’m creating game kinda like Mario but before I make it I need to know 2 things.

  1. Since the game will have levels I need to make it so you can create a save data that saves what level you’re on, how many coins you have, your username, and things like that.
  2. How to publish my game, preferably as a downloadable game but if I have to some other way will work.

If you know the answer to either of these pls tell me whether it’s only an answer to one or both.

I would have a save button that gives you an array or something like that. you will probably have global variables for the 4+ things you want. the array should be something like [project.lives, project.level, project.coins, project.username]. JS seems to not show the brackets so that might be annoying. it’s also extremely cheatable, but we have to go on honor system, or you go through the pain to “encrypt” stuff.

to give it back, find out how to utilize the input text. the user will put the save code in. i’m calling it saveCode.

instead of setting the default info (project.lives = 3), do something like project.lives = saveCode[0]. do the same for the others.

Does this make any sense?

kinda, i need it to be more specific on how id do it though

i’ll do my best to make a model or something.

alright send it to me when your done

Sorry to interrupt, but I remember this post on the forums that I had to search up to find about saving. It might help:

My Project7-28-2020_9-41-47AM.wick (5.8 KB)

this only has a load game and new game function. the format for the data is: lives, username

1 Like