ID:260066
![]() Nov 23 2005, 10:13 am
|
|
I was wondering why does byond have limits? Like for procs. It can be annoying when you make an RPG with list as monsters for the turfs. I did a map 300 x 300 and I had to reduce it to like 1/4. I know how to make it work better w/o using lists, but it's annoying to remake things. :/
|
![]() Nov 23 2005, 11:00 am
|
|
BYOND does have limits on the number of lists you can have, so giving a list to every one of your turfs probably isn't a great idea.
|
Maybe using areas would help, especially if you had duplicate turfs (I'm just guessing at what you're trying to achieve here, however).
|
It's for a very simple reason - All programs have limits. BYOND needs to be able to store the location in memory of every list you make, and the variable that they use for counting the number of lists only goes to a certain number before it 'overflows' and actually becomes negative (Or zero if it's unsigned).
The limit on lists is 65535. You just cannot physically have any more because of the way BYOND is structured. It's not a bug. Anyway, you shouldn't need anything remotely near that number. defining a list for all turfs is just bad, assuming you have it initialised at startup. You should only ever initialise a list when you need to use it. Otherwise, leave it null. Maybe you should read Lummox's article on Green Programming: http://www.byondscape.com/ascape.dmb/LummoxJR.2005-0506/ |
PirateHead wrote:
BYOND does have limits on the number of lists you can have, so giving a list to every one of your turfs probably isn't a great idea. What you can do is have a list var for each turf, but have it be equal to null when it's empty. If most turfs don't have lists, you can avoid running into the limit pretty much indefinitely. |