Question about the new "Local Storage" plugin

Discussion and feedback on Construct 2

Post » Tue Apr 14, 2015 7:54 pm

Are the local storage datas deleted if the user empties the cache of his phone, as it was the case with the webstorage?
I don't think this is not mentionned in the update notes.

Another question : at the beginning of my game, I should load around 150 datas. With webstorage it appeared to load instantly, but @Ashley tells that we should use the "get item" action and then a moment later the "On item get" trigger fires with the value being available. Are the datas loaded in the chronological order?
i.e. if I check if the last data I loaded, does it implies that ALL other datas are ready to use?
Is the loading speed the same as with WebStorage?

I suppose this will come a little bit later, but a manual entry for it would also be greatly appreciated. ;)
B
32
S
6
G
1
Posts: 353
Reputation: 2,821

Post » Tue Apr 14, 2015 11:50 pm

I have another question-

I set a value into webstorage every tick, it works fine.
But in local storage, the hard disk rotates always with big noise.
B
109
S
27
G
276
Posts: 4,479
Reputation: 154,418

Post » Wed Apr 15, 2015 1:49 am

I can really see it in my mind now...this "new cool" local storage is trouble.
Twice the action needed to get what would have been a single line of code.

All I see is the amount of re-write awaiting my game.
Why can't Construct 2 handle this "On item get" trigger automatically ? Why isn't that an option [auto]
Can't construct 2 assign/compare the value when the data "decided" to arrive in the background ?
Why must we handle this...

This is trouble...
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Wed Apr 15, 2015 2:04 am

Where I used to be able to check a set of parameters on start of layout (if they exist and, if so, what their values are), this now requires me to pause the layout until all of the triggers have fired, lest the player is spawned in the wrong place etc. Which means extra faff tracking which triggers have and have not fired as well. I am not sure that this is an improvement... Perhaps there needs to be an option to wait for a trigger to fire - but the on start of layout / load a bunch of variables from web storage seemed to work well and was not in need of tweaking IMO. As @Toddler said, could this waiting for a load trigger be an option?
A big fan of JavaScript.
B
76
S
20
G
73
Posts: 2,244
Reputation: 45,962

Post » Wed Apr 15, 2015 5:12 am

Colludium is right, now things like this:
Image
Cannot be done easily anymore, now you need to implement some trigger crap.

Now in the previous case, it might STILL be fine but what about this ?
Image
This code is called when a certain frame in a looping animation is reached.
I know some might say you should load the data into some variable and not access the file system that often but I am telling you, the game works smoothly, webstorage is working well, no, I am not loading the ENTIRE INTERNET on every frame so it is not going to be a problem that this new plugin is so eager to try to handle [loading BIG ENORMOUS DATA because yeah that is what most game created using construct2 have to deal with right ? BIG DATA the size of the internet... pssh...]
It was SOOOO easy presently.
But now with the new and improved "localstorage", things are going to be more complicated than it has to be.

"Oooo with the new *parallel* processing, things will be faster" and all that crap.
If it is supposedly going to be so fast, and "along side", why do we now have to face the issue of not only re-writing our codes but have to implement some sort of "wait"/"pause" function like Colludium said to do what you are seeing here ?

This "new upgrade" is not a even close to "good".
It is Terrible.
Just Terrible.

Can Construct2 atleast make this *New and Cool and parallel and so awesome you should forget about using the old webstorage* plugin have like this internal build in "wait until the result is retrieved and then continue" option that makes it behave like the original supossedly *bad or OLD* system that is actually friendly to us ?

I have been working on my game for four months now and this crap happens.
I am just going to wait and see where this terrible direction is going before I continue, I have stopped the game development for now.

This is Terrible...why is anyone even praising this new *improvement* ?

To all the fans of this new *awesome new way of loading data* plugin:
Yes I am glad you now have the ability to load 1GB of data into your game on a "parallel" thread without slowing down you game and be notified when your 1GB of data has been loaded.
No 99.9% of us creating casual games don't have to deal with that, so thanks for messing it up for the rest of us, because we REALLY LOVE having to access a saved data that is like maybe 100kb and have to then wait for another trigger to tell us when that has been loaded for us to then access it, yeah that *awesome* we really love that...

You know what else we love ?
Maybe construct 2 will *improve* its sound playing system by making a function to play a sound but then create a trigger to let us know that the sound device is now actually ready to play the sound before we THEN play it, if we are going to mess it up why don't we go all the way ?

Hey check that, why don't we ALSO implement like when pinning a sprite to another sprite, we make it so that we have to wait for a trigger after calling "pin to object" that tells us that the sprite is *ready* to be pinned which we will then call another function to *actually* pin it ?

Let's do that, lets *improve* construct 2...
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Wed Apr 15, 2015 6:18 am

@Toddler I agree with you that having to rewrite our codes is not really good news, but it is still very early to start complaining.

Maybe the loading time will be as fast as it was previously (I asked it in the first topic) which was nearly instantaneous.
The old WebStorage plugin is still usable if you have it in your current projet, so if it doesn't work well for you, you can keep the Webstorage.
It seems like the WebStorage "may" be deprecated in the future by browsers, which would simply disable the saves in our games... Frightening! I don't see this happenning before a bunch of years, but still I'll try to avoid this.
If the LocalStorage keeps the datas when the users empties his cache, it would be a great improvement IMO. It's also something I asked for in the first thread and hopefully @Ashley has an answer for us.

So, if everything is working fine I see this as an improvement... that will cost us some additional work.
B
32
S
6
G
1
Posts: 353
Reputation: 2,821

Post » Wed Apr 15, 2015 7:04 am

Please implement the "Check if Exist wait until respond received" or "Compare value wait until respond received".

Nobody appreciate a trigger for this, nobody is loading 1GB of data for the majority of us, stop this nonsense.
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Wed Apr 15, 2015 9:21 am

I will admit that everything asynchronous is something hard to keep up inside C2's event system (which is based on a from top to bottom logic, with events needed to be complete before the next)

@Toddler maybe you could use a dctionnary, and save that dictionary to the Local Storage (since the dictionary values are setted ASAP, you will not have that much trouble).
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed Apr 15, 2015 10:16 am

Thanks Aphrodite.

However, no amount of gymnastics is going to cover for the fact that a freaking trigger is needed just to get a value from a storage system.

Again, we are not talking about 1GB of game data to be loaded here, please stop this nonsense before it becomes the norm and everyone stop talking about it and silently accepts this is the direction Construct 2 is going...

The next thing you know you will need a trigger to know that a sprite is ready to have its animation changed or else you cannot set the animation...you never know right ? I mean who would have expect that you need a trigger to know that a value have been retrieved when trying to load from a web storage and to be told it is an "upgrade" ? People would say that this crazy, but here we are !

Ok, I can accept that maybe the old web storage is too far gone in the deep end of deprecation to be future proof or "accommodated", but surely this new "awesome" localstorage could be made to simulate the old simply more logical direct approach right ?

Please implement the feature option right into this *new and awesome* local storage to internally wait and then when the value is retrieved continue the program.

Please please please don't say that would cause a lag in the game if internal *wait until loaded* is implemented, cause isn't this parallel bullcrap supposed to be "faster" ?
Oh suddenly it is causing a lag now ? OH WOW really ?
Last edited by Toddler on Wed Apr 15, 2015 10:28 am, edited 2 times in total.
B
12
S
3
Posts: 288
Reputation: 1,694

Post » Wed Apr 15, 2015 10:20 am

I haven't looked at the new plugin yet, but can you just use Dictionary instead? And when you need to save/load just do so with dictionary json data?
B
151
S
75
G
20
Posts: 1,793
Reputation: 22,749

Next

Return to Construct 2 General

Who is online

Users browsing this forum: BlueAlfie and 3 guests