How many arrays is too many?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello again

    My project uses a whole bunch of arrays, and some will get quite large in 3 dimensions

    Are there any limits on the number and size of arrays? I would hate to get near completion and realize arrays won't cut it.

    I am using arrays for everything, and I mean everything. Any objects are just visual representations or backdrops or UI (or blitted text), all data on them is stored in arrays and I have a OneNote with a "key" which I use as a reference guide for myself. I even made a small tool to import CSVs to Clickteam format for preloaded data!

    It's been an adventure to say the least translating procedural algorithms into Clickteam events, but it's working very nicely! I am taking great pains to make everything as efficient and lightweight as possible

    Anyhow, I can't imagine I would hit some limit, but if anyone knows what the limits for # and size of arrays might be, please let me know! I would greatly appreciate the information <3<3

  • The implement of array (at least Android is, we don't have Windows source, but usually the behavior is the same) has no optimize for sparse array. Memory will be allocated once write to a coord that exceed the current capacity.

    So it's easy to calculate the memory usage, x * y * z * element size, result in byte, divide it by 10^6 for mb. For value, element size is 4, and for string it's string length + 1. If you alloc a 3 dimension array (large map tile info for example) it's possible to exceed the 3.2GB memory limit.

    Solution : use another data structure, or wait for the (promised) 64bit update.

  • I think you'll be fine, but if you want peace of mind, then just create a simple stress test. Use fastloops to create a few thousand arrays and fill them up with some data, and see whether your computer explodes. If it does, buy a new computer, reduce arrays by 10% and try again.8o If it doesn't, proceed confidently with your project.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • I think you'll be fine, but if you want peace of mind, then just create a simple stress test. Use fastloops to create a few thousand arrays and fill them up with some data, and see whether your computer explodes. If it does, buy a new computer, reduce arrays by 10% and try again.8o If it doesn't, proceed confidently with your project.

    You should first make a backup. Otherwise, when your computer explodes, you loose all your projects..

  • Thanks guys :D


    So I tried this. I took some time to complete, but only 3 flames burst forth from my CPU so I think we're good to go.

    In all seriousness, there no way all the arrays combined in this project will even reach the equivalent of a single 1000x1000x1000 array, let alone 100 of them :D So I think my fears are placated, for now. I will also be exporting only to PC and MAC so memory is not that big of an issue. Even the array experiment didn't eat up too much!

    Thanks again for the information!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!