Arrays - How Many is too Many?

0 favourites
  • 10 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Hi all,

    Bit of a strange one, but I'm wondering if anyone has experience of using a lot of arrays in a C2 project? By a lot I'm talking around 1,000 - 1,500.

    I'm working on an RPG style game and this number of arrays is due to the number of items in the game that will need an inventory and/or outcome text (to clarify this is for desktop, not mobile).

    I have everything working with a few objects and 100 arrays, so just wondering if I'm going to push things too far having thousands? I'm thinking that as it's only text data then it shouldn't really be an issue on performance, but my main concern is around saving, as all of this array data will need to be saved to a local storage fairly often (via json strings in a dictionary that is then saved to local storage).

    Any wisdom or experience would be appreciated, thanks

  • I wouldn't worry about it unless it becomes slow to save/load.

  • Construct 2 was designed to handle complex projects as well, so I'd say you don't have to worry about this.

  • Mostly like other development tools, when your application runs out of RAM memory.

  • Hi all,

    Bit of a strange one, but I'm wondering if anyone has experience of using a lot of arrays in a C2 project? By a lot I'm talking around 1,000 - 1,500.

    I'm working on an RPG style game and this number of arrays is due to the number of items in the game that will need an inventory and/or outcome text (to clarify this is for desktop, not mobile).

    I have everything working with a few objects and 100 arrays, so just wondering if I'm going to push things too far having thousands? I'm thinking that as it's only text data then it shouldn't really be an issue on performance, but my main concern is around saving, as all of this array data will need to be saved to a local storage fairly often (via json strings in a dictionary that is then saved to local storage).

    Any wisdom or experience would be appreciated, thanks

    I use arrays quite a lot since my game is SRPG and it's vastly faster to parse through bytes of data than parsing through megabytes of sprites and I don't have issue yet with anything connected with saving/loading nor arrays.

  • Thanks guys, seems like not it's not going to be a deal-breaker then. I'll keep ploughing on!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm having constant crashes when i try to save the state of at tilemap wich has 2300x2800 tiles. Could it be related to this?

  • If some javascript takes too long to run the browser will give you an option to stop it. As long as it wasn't an infinite loop in your code causing it you can let it continue an it will complete. AKA it wasn't a crash.

    That said, saving a tilemap of that size may be the reason it takes so long.

  • If some javascript takes too long to run the browser will give you an option to stop it. As long as it wasn't an infinite loop in your code causing it you can let it continue an it will complete. AKA it wasn't a crash.

    That said, saving a tilemap of that size may be the reason it takes so long.

    Well, on nw.js it just closes, and in chrome it says the page has an error. I have to try on firefox yet. It doesn't even try or take too much to display that error or close, it seems that it doesn't even tries.

    BTW, i have looked a lot of your examples on this site, and they have been really helpful. I really appreciate your work here.

    EDIT: well, it seems that the crash does not ocurrs when it saves, but when it tries to load it. Instant crash.

  • Sounds like a bug to report. It shouldn't crash.

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