How do I to save variable forever?

Get help using Construct 2

Post » Thu Feb 12, 2015 9:48 am

i have in-app purchase in game

When a player buys weapons in the game, the global variable is changed, how do I properly maintain this variable to the next time the player entering the game, had open arms?
B
4
Posts: 15
Reputation: 304

Post » Thu Feb 12, 2015 11:23 am

Webstorage
Image
B
16
S
7
Posts: 126
Reputation: 1,910

Post » Thu Feb 12, 2015 1:23 pm

u have video tutorial?
B
4
Posts: 15
Reputation: 304

Post » Thu Feb 12, 2015 7:18 pm

EstudioCelula3 wrote:Webstorage


this is not true, webstorage is not a good way to save something "forever".... but it's a good solution just for the apps for android or iOS, and I'm not sure, but I think if you remove the game, you will lost everything...

for the computer, webstorage is useless if you want store some important data..etc.... is good just if you want to remember something not important... (if you delete the cache...you can say bye bye to your savegame...)

the best, it's to save data in your server with a personal access for that user...so, you have everything in your server, and If AJAX works in mobile (I never tested) this is the best way if you want to save something forever :D
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Fri Feb 13, 2015 10:44 pm

@Ribis Webstorage is not deleted when the cache is cleared afaik.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,679

Post » Sat Feb 14, 2015 10:45 am

You could always make the game online and store stuff in mySQL which would be more better if you understand php as you can change someones item if they exploit it or refund someone.
B
10
S
1
G
1
Posts: 63
Reputation: 840

Post » Mon Feb 16, 2015 9:59 am

sqiddster wrote:@Ribis Webstorage is not deleted when the cache is cleared afaik.


yes, in my computer if you save something in webstorage, and you clean everything cache...etc (from chrome), you will lose everything....

another point, it's a piece of cake to hack it... if you store coins, levels...etc, you can hack everything in 5 click, you don't need any software to do it...just chrome works for you :lol:

the best is to store everything in your server, but in other hand you must have a connection if you are making a game on internet, with nodewebkit you can save file in the computer, if I remember...

Paperbeemo wrote:You could always make the game online and store stuff in mySQL which would be more better if you understand php as you can change someones item if they exploit it or refund someone.


this is the solution, you can also save JSON file for load some level (taken coin...etc)
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Tue Feb 17, 2015 9:58 am

As Defender225 want to save IAP data, it is not a problem to use WebStorage, because he always fetch items first then storage info in WS.
Image
B
16
S
7
Posts: 126
Reputation: 1,910


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 14 guests