[Suggestion] method to save and load big data

Discussion and feedback on Construct 2

Post » Sat Jan 25, 2014 9:45 am

Hi all,

I'm making a game online... and I make a method to save the data of user in my database, actually every user can save like 70 variables and load in the game.

this working fine, but I think what happen if I would like to save the position and the variable of the object in the map.

I'm thinking to save the important variables in the database (level, health...etc) and the position of the object in the JSON file (or in local?)

but if someone clean the cache of the browser it's a problem, and I can't make 6000 records for each user in my database, will be crazy...

so, another idea it's to save a JSON file in the server, like,

if the user save the game, the string of JSON will send to a php, the php will make a file .JSON with the name of the user in a specific folder.

if the user load the game, scirra will load the json from the same folder with the same username.

this idea can work? 6000 records it's a lot for JSON file? I have another problem for save a items... every sprite has 5/6 variables and if i will save on database i need to make another 100 records (it's not a big problem...but if exsist something better is good to change this)

thank you very muchRibis2014-01-25 09:46:07
Posts: 298
Reputation: 2,972

Post » Sat Jan 25, 2014 12:48 pm

My project saves 75 JSON strings and each json string is a 1300x3 array.
I never had a problem with it but I'm using only the local storage.
If you are worried about the file weight here's a tool that may help you to guess the overall size of your strings.

Json Generator
Posts: 224
Reputation: 2,028

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests