Is it possible to make a game that if you log off your progress will still stay the same because I will be making a game that genuinely takes a long time to finish.
[ insert removed image ]
first remove that image because it shows private info and also ummmmm do u have a personal computer
i’m not very experienced in this but javascript has something called localStorage, which can be used to save and load certain things. there may also be a way in javascript to prompt downloading and uploading a JSON file but i’m not sure how exactly it would work.
The one I am using is my school laptop but I’m not gonna tell ya if I have a personal laptop/computer but I have a lost phone and tablet-ipad thingy rn
okay if u have a personal computer and somehow code the saving thing then it will work if u upload it to like itch.io or newsground
Yes you can, do what @BaronAWC said, you should never rely on a site like itch.io to save it will always be better to just code it in yourself
There is one such cursed way. Just make a link, turn the JSON into a data-url
, make the link download-able and click it.
var link = document.createElement('a'); // Create Hyperlink
link.href = `data:aplication/json;base64,${btoa(project.focus.export())}`; // Create Save
link.download = prompt('Save name?', 'Save') + '.superEpikGameSaveF0rm@t'; // Make a file download name
link.click(); // Download the file
link.remove(); // Remove the link from HTML
And you can learn about FileReader
and File Inputs too, sometime I’d make a lib for wick.