I will need to save data into an array as a json file because there will be possibly over a thousand data to be stored, so saving as individual variables might not be the way to go. However, I am having problem in that when I save the array and load it, it works fine as I move between layouts, or restart the game using a restart button inside the game. However, when I exit the game and than run it again, the data is not available anymore. I made a capx below.
Please run the "main" layout. Press on the play button and it will bring you to another layout. Press any of the blue boxes to increase the value. The values for button 1 and 2 are being saved to an array and stored to webstorage as a json file. The third one is saved using normal webstorage. Switching between layouts or restarting by pressing the green button in the main layout shows everything works fine. But when you exit and restart, only the third one saved with normal webstorage is displayed correctly.
I am sure I must be doing something wrong, could anyone please help point out what I am doing wrong?
Also out of curiosity, does the amount of data stored and being saved and retrieved affect the performance of the game? For example, 10 000 individual webstorage key for a mobile game, will there be a noticeable effect on performance?