ID:271909
 
Ok, from what I understand the limit to variables, lists, text strings and so on is 65535.

First question is how are these limits counted?
If I made an object with 10 variables and placed 100 of those in a game for example, would that count towards the limit 10 variables, or 1,000 variables (10 for each object)?
As for text strings... Just how is the limit for these counted? Is it text strings counted when the game is compiled, or text strings actually stored and used in the current game? (For example, having 100 objects with a list that has 10 text strings, would that count as 10 towards the limit, or 1,000).

My second question is to do with lists. Would it be better to simply use variables as normal, for example giving people a variable for hp, mp, str, def, mag, spd... And so on, or would it be better to use a single list for all those variables, such as stats=list("hp"=10,"mp"=10,"str"=10,"def"=10,"mag"=10,"spd"= 10) ?
And my third question is how exactly would that list contribute towards these limits?

And my final question is about the limits of mobs/objs/turfs and so on. Again, how is this limit counted? Is it the total number of them in a game, or the total number of different ones (such as having 100 different objs only counting as 100 towards the limit even if there is 1000 in the game).
If it is the second then how would having mobs/objs/turfs that change count towards the limit? I'll use a tree as an example, imagine it starts out as a sapling, and overtime grows into a full tree. Despite it being a single turf each and every one of them could be different from the next. Would this count as 1 towards the limit or 1 for each different tree?
The Magic Man wrote:
First question is how are these limits counted?
If I made an object with 10 variables and placed 100 of those in a game for example, would that count towards the limit 10 variables, or 1,000 variables (10 for each object)?

In this case, I believe that would only count as ten variables.

As for text strings... Just how is the limit for these counted? Is it text strings counted when the game is compiled, or text strings actually stored and used in the current game? (For example, having 100 objects with a list that has 10 text strings, would that count as 10 towards the limit, or 1,000).

This probably only counts for strings that are currently stored. I'm sure all compiled-in strings are permanatly kept, as well as the current values of variables that are strings, and any string in a list.

My second question is to do with lists. Would it be better to simply use variables as normal, for example giving people a variable for hp, mp, str, def, mag, spd... And so on, or would it be better to use a single list for all those variables, such as stats=list("hp"=10,"mp"=10,"str"=10,"def"=10,"mag"=10,"spd"= 10) ?

It would far easier to manage using variables, and it's not likely you'll ever hit the 65535 limit with them.

And my third question is how exactly would that list contribute towards these limits?

A total of 65535 lists in one game will cause the game to give a runtime, and probably kill the process.

And my final question is about the limits of mobs/objs/turfs and so on. Again, how is this limit counted? Is it the total number of them in a game, or the total number of different ones (such as having 100 different objs only counting as 100 towards the limit even if there is 1000 in the game).

This counts towards the total objects that currently exist in game.

If it is the second then how would having mobs/objs/turfs that change count towards the limit? I'll use a tree as an example, imagine it starts out as a sapling, and overtime grows into a full tree. Despite it being a single turf each and every one of them could be different from the next. Would this count as 1 towards the limit or 1 for each different tree?

It'd probably be best just to change the information about the tree object, and add more as it got bigger.
The Magic Man wrote:
Ok, from what I understand the limit to variables, lists, text strings and so on is 65535.

First question is how are these limits counted?
If I made an object with 10 variables and placed 100 of those in a game for example, would that count towards the limit 10 variables, or 1,000 variables (10 for each object)?

It counts as 10 variables. They won't use up any extra memory for each object except when you change the object's vars at runtime. Any non-initial var setting uses memory. E.g. if all slimes have level=1 by default but the game creates one with level=2 for more challenge, that uses a little more memory.

As for text strings... Just how is the limit for these counted? Is it text strings counted when the game is compiled, or text strings actually stored and used in the current game? (For example, having 100 objects with a list that has 10 text strings, would that count as 10 towards the limit, or 1,000).

The limit is based on unique text strings, and several things add to that count at compile-time.

My second question is to do with lists. Would it be better to simply use variables as normal, for example giving people a variable for hp, mp, str, def, mag, spd... And so on, or would it be better to use a single list for all those variables, such as stats=list("hp"=10,"mp"=10,"str"=10,"def"=10,"mag"=10,"spd"= 10) ?

If every mob in your game could conceivably have stats, then you'll want to use vars and conserve your lists.

And my third question is how exactly would that list contribute towards these limits?

That list above would contribute exactly one list toward the total limit. But design-wise, you'd be talking one list per mob, because each mob would have their own separate stats which means separate lists. That's a lot of lists. If not too many mobs exist at any given time (like in your average Roguelike), that's not bad.

And my final question is about the limits of mobs/objs/turfs and so on. Again, how is this limit counted? Is it the total number of them in a game, or the total number of different ones (such as having 100 different objs only counting as 100 towards the limit even if there is 1000 in the game).

Total in the game.

Lummox JR