Question about the new "Local Storage" plugin

Discussion and feedback on Construct 2

Post » Thu Apr 16, 2015 5:50 am

@jobel it's because I'm use them to actually replace variables that I need to be saved. Some of these values, e.g. total time played in milliseconds, are set every tick.

I guess I should change everything over to global variables, but weirdly enough I've never seen any performance problems. Apart from the GPU side of things, the game seems to perform quite well on a lot of machines.

Again, '2012 me' would have implemented it a very different way if he knew any better. But due to a lack of best practices documentation, he really didn't know what to do. 2012 me didn't even know what file I/O was!
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Thu Apr 16, 2015 7:05 am

jayderyu wrote:I realized today that there is nothing wrong with the way the new storage is.

Just use Dictionary for your data. When you want to save long term use the new LocalStorage. When loading use a splash screen and when it's loaded from local storage into dictionary your all good. Honestly this is how I do saving loading in Java/C++/Unity anyways.


Couldn't agree more with this
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Thu Apr 16, 2015 8:21 am

I'm sorry if this has been discussed or noted somewhere before, but when is the online plugin reference entry for this new LocalStorage coming? I know it's pretty similar to WebStorage, but some actions, events and expressions still confuse me.
For example how exactly to handle the "On all key names loaded" event, since this appears useful to me.
B
5
S
1
Posts: 4
Reputation: 283

Post » Thu Apr 16, 2015 8:25 am

@khenkel

Download r202, then you will find it.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

Post » Thu Apr 16, 2015 9:03 am

rexrainbow wrote:@khenkel

Download r202, then you will find it.


I followed your cryptic guide, but still wasn't able to find the corresponding reference entry. (besides I also downloaded it yesterday)
All available "Help" links lead me to the scirra.com main page. (the local manual has no LocalStorage either)
B
5
S
1
Posts: 4
Reputation: 283

Post » Thu Apr 16, 2015 9:06 am

@khenkel The manual is only updated for stable releases.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,680

Post » Thu Apr 16, 2015 9:07 am

@khenkel, beta releases don't have documentation. The reference docs will only be added when plugin goes to stable. The reasoning is that this plugin is in beta, and can change a zillion times over before stable, and by the looks of things some changes are coming.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,728

Post » Thu Apr 16, 2015 9:16 am

@ramones @DUTOIT
Thanks for the info! This makes sense :)
B
5
S
1
Posts: 4
Reputation: 283

Post » Thu Apr 16, 2015 12:04 pm

@rexrainbow your cache plugin seems even more confusing compared to simply load the values from the storage when needed, save them when needed, and not using them otherwise since.. well, those are saved infos that you only need to load at certain times, caching them is not something I would want as I woukd rather use the original info rather than even trying to call this one, could be useful for somebody though I guess.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Thu Apr 16, 2015 12:46 pm

@aphrodite

Thanks for comment.
B
110
S
28
G
280
Posts: 4,488
Reputation: 156,568

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests