Question about the new "Local Storage" plugin

Discussion and feedback on Construct 2

Post » Tue May 26, 2015 9:49 pm

@CDogs1964 they normally don't add manual entry's for new feature until it is in a stable build


as of to today local storage in out of beta as a stable build was released so they have made a manual entry detailing its actions and conditions https://www.scirra.com/manual/188/local-storage
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Wed May 27, 2015 9:15 pm

Message: oldandgrey can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Ok, lost track of the number of times I've tried to post what was to be my first post.

For those like myself that need a little more help re loading and saving from local storage here (I hope) is a simple example capx.

https://mega.co.nz/#!SEhWyZKZ!D2-4onXVbwYCjIBephhRAMRYxEZrMm7fCxSA0eH6Zys
B
13
S
2
G
1
Posts: 22
Reputation: 760

Post » Sun Jun 21, 2015 12:58 pm

As @alspal and @Aphrodite have said, use a Dictionary. Just load it from Local Storage when your game starts and save it only when needed, such as when changing level, exiting the options screen, game over screen etc.

I've just switched my project from WebStorage to LocalStorage just now. It seemed quite cumbersome until I've started using the Dictionary method and now it's nice and easy.

Async data loading is generally better because it doesn't freeze your game when loading and the standard for many other engines/coding languages (C#, Flash for example). I know most Construct games won't have loads of data to load but you also have to remember that one of the targets for Construct 2 games is the mobile market where the games won't perform as well as on PC and any bit of optimisation welcome.
B
4
Posts: 1
Reputation: 202

Post » Mon Jun 22, 2015 5:47 pm

I made a capx as well and used a dictionary which from what I have learned is a good way to go if you have a 'lot' of info being stored with the Local Storage plug-in.

https://www.dropbox.com/s/61kstfx7pbr3j ... .capx?dl=0
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: wertt22 and 16 guests