Load a BIG array without LAG

0 favourites
  • 10 posts
From the Asset Store
In this template the music plays without looping in your game
  • i have an array of 1000,20,1, i have in my project on start of layout -> Load from JSON string , i have lag using construct 2 after i paste the array information from the array tool creator, i am using local storage to save information in the array, how i can handle big arrays without lag? i need to load the information from a CSV file? i can use local storage to save information in the CSV file? i cant use Load from JSON string with big arrays?

    I don't want to complicate my head with this, i am not programmer, i can handle this construct 2 lag to edit events, my only concern is if this construct 2 lag have any impact in the performance of the game? in the debugger when i tried to see the array i get lag and the FPS down a lot like 9 FPS, after some seconds the debugger return to 58-60 FPS without lag.

  • Can you post a Capx? I have a feeling the lag is from the local storage.

  • Can you post a Capx? I have a feeling the lag is from the local storage.

    i am not using local storage in my test project, i just paste the big array and nothing more, i tried with 500,30,1 and this size reduce a lot the lag using construct 2 to edit events , with 200,30,1 i don't have any lag, my concern is if big size array have some impact in the game, the debugger give me lag only when i tried to see the array and this lag is for some seconds, and if i use local storage i need to know if the big array will have some impact in performance.

  • > Can you post a Capx? I have a feeling the lag is from the local storage.

    >

    i am not using local storage in my test project, i just paste the big array and nothing more.

    OK sorry, I am done guessing.

    Loading a 1024x1024x1 array from a text object full of Perlin noise values and it is instant. So I am thinking it is not a C2 bug.

  • >

    > > Can you post a Capx? I have a feeling the lag is from the local storage.

    > >

    > i am not using local storage in my test project, i just paste the big array and nothing more.

    >

    OK sorry, I am done guessing.

    Loading a 1024x1024x1 array from a text object full of Perlin noise values and it is instant. So I am thinking it is not a C2 bug.

    then is normal this lag in construct 2 and in the debugger? i don't need to worry about the performance of the game using big arrays with Load from JSON string?

  • If you're loading the array once, you'd at most get a pause depending how big the array is. If it's impacting the fps then that sounds like you're loading the array every tick.

  • If you're loading the array once, you'd at most get a pause depending how big the array is. If it's impacting the fps then that sounds like you're loading the array every tick.

    On start of layout -> load from JSON string..... i need to add trigger once in this event? i only have lag when i am using construct 2 to edit events and in the debugger only when i check the array and for some seconds, but i don't have lag when i open the game normally in the browser.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, I misunderstood. So if it only happens in the debugger I'd say that can be expected since the debugger does more stuff such as displaying all the values in the array.

  • i think its best to use a text file instead of json string i am try to know how to load array from file myself

  • Yes load the array from a project file instead of pasting a huge array into the event sheet.

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