Local storage is very slow

0 favourites
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • So, in short i removed action "get localstorage.Coins" from the game almost at all and now coins are working fine.

    Do it for all then.

    Tip: Dop2000 is really helpfull in this forum , he know better than us so if Dop say somewhere in your code you are doing something wrong then you do.

    If you do not want to share all the project you can screenshot the parts you use the localStorage and share it.

  • There is no need to post the code,because its already mentioned in the post.

    Do you need help with this or not? Mobile or desktop - it doesn't matter, if it takes 5 seconds, this means that your code is wrong!

    savvito123 Cheers :)

  • > So, in short i removed action "get localstorage.Coins" from the game almost at all and now coins are working fine.

    Do it for all then.

    Tip: Dop2000 is really helpfull in this forum , he know better than us so if Dop say somewhere in your code you are doing something wrong then you do.

    If you do not want to share all the project you can screenshot the parts you use the localStorage and share it.

    I wrote it in text ----> on event complete- load load load load. Watch in the first message it is it,nothing more with gets or something.

  • it clearly looks like a bug because after deleting localstorage.coins problem starts to appear on localstorage.shotgunlevel, where everything was working fine before deleting localstorage.coins

  • load load load load

    That's not how asynchronous works.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I wrote it in text ----> on event complete- load load load load

    There is no "On event complete" in Construct. And there is no "Load Load Load" action in Local Storage plugin. It's not a bug, I've seen problems like this many times on this forum. Your code is wrong, good luck fixing it.

  • Your "code" does not show where you are waiting for each item to be finished loading. That's why you want one single item to get, so you only wait once. If you'd posted your real code, this would have gone much faster.

  • > I wrote it in text ----> on event complete- load load load load

    There is no "On event complete" in Construct. And there is no "Load Load Load" action in Local Storage plugin. It's not a bug, I've seen problems like this many times on this forum. Your code is wrong, good luck fixing it.

    You guys already helped me. Thank you all! I wrote like this because i dont think there is difference in which one event was complete, as well as UE thinks so too, by placing on "on event complete" node. Its just means it is triggered.

    Here is the code and thats it. The only difference is that it is made for every gun and it is identical and also coins text is set on localstorage.itemvalue (when get localstorage.coins)

    That is it with localstorage expressions and i don't know where is my code wrong, cuz nothing changes when u place wait till asyn. actions are done.

    And as i have already mentioned - removing get coins( as on screenshot) makes get shotgunlevel load for 5 seconds, like get coins was, before removing.(get shotgunlevel was working fine before i deleted get coins)

  • You should not use "Get" without checking if the item exists. The correct code is:

    On start of layout -> Local Storage Is "PistolLVL" exists
    
    On "PistolLVL" exists -> Set PistolLVL to LocalStorage.ItemValue
    

    This doesn't explain the 5s delay though, there must be something else in your code.

  • You should not use "Get" without checking if the item exists. The correct code is:

    > On start of layout -> Local Storage Is "PistolLVL" exists
    
    On "PistolLVL" exists -> Set PistolLVL to LocalStorage.ItemValue
    

    This doesn't explain the 5s delay though, there must be something else in your code.

    Didnt know that. Thank you! Yes it doesnot explain. The other part that i dont show is list of included arrays,there is no need to show them i think. Also pay attention to that this is a "Floating problem" (in my language idk how to translate it correctly)

    in short just to remind you: coins are slow,shotgun is ok. If you delete coins,then shotgun is slow but shotgun remains untouched,while pistol is ok

  • You should not use "Get" without checking if the item exists. The correct code is:

    > On start of layout -> Local Storage Is "PistolLVL" exists
    
    On "PistolLVL" exists -> Set PistolLVL to LocalStorage.ItemValue
    

    This doesn't explain the 5s delay though, there must be something else in your code.

    i had problem like this and it solved after re-writing big chunk of the code by looking at photos. I just was watching either how to solve it or make a "kludge" so it will work somehow even with stupid code

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)