How many values can a list hold?

0ven

  • Posts: 19
I have a game in mind that requires two lists that can hold a lot of values (~1000), the values would be a few words. I was wondering how many values a list can hold before Stencyl becomes buggy? Has anyone tested this in the past?

gamegirlxl

  • Posts: 713
It's probably very very high.  I think it could go up to the same value that the variable type "int" is allotted, but I'm not entirely sure.  I'm not sure if trying to access the values in a long list have any lag.

Hectate

  • *
  • Posts: 4645
I tried googling the answer but there doesn't seem to be a hard number listed anywhere. I suspect this is simply due to the way that Arrays (a List in Stencyl) are designed. They hold as many things as they need to, up to the maximum memory allocated to the program for that array. What you hold in the array is likely the determining factor of how much memory that is.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

MyChairHasALooIn

  • Posts: 310
I've used arrays (lists) in stencyl far far in excess of that 1000 figure. The biggest I remember was a 3d array at 200*200*5 for a total of 200,000 entries. But I'm fairly sure (not certain) I've touched the 5 million entries marker before too. Incidentally the 3d array was a game attribute-list allowing the entire world to be both randomly generated and saved :).

Realistically you should base your usage limits on how much processing happens to a list per cycle and not worry too much about maximum entries, because the former is more likely to cripple your project than the latter.

gamegirlxl

  • Posts: 713
The biggest I remember was a 3d array at 200*200*5 for a total of 200,000 entries. But I'm fairly sure (not certain) I've touched the 5 million entries marker before too. Incidentally the 3d array was a game attribute-list allowing the entire world to be both randomly generated and saved :).

Realistically you should base your usage limits on how much processing happens to a list per cycle and not worry too much about maximum entries, because the former is more likely to cripple your project than the latter.
I think that you can have potentially more data in a 3D array than in a simple list, because you might go over the "int" limit if you're using a numerical reference thing.  I can't remember the exact number (some power of 2 most likely), but I don't think I know enough words to put number them that high.

If you're making some sort of dictionary, I've seen people store many many many words in .txt documents.  Usually if it can be fit into a .txt document, it's not too big, but it might cause lag if you try to get too many values at once, and such (which has already been said).