ID:161986
 
I never got an answer to this question so I might as well ask it again in it's own thread since it's becoming important.

How many instances of a custom datatype with no ancestor can you create within a game?


The reason for this is because in order to cut down on object counts, I want to convert objects into pure data when they are out of anyone's sight, and then have them get constructed back into objs when they are suddenly needed again. BUT the stats need to be modifiable even when they are out of sight, just as if they were normal objs.
If you're talking about /datums, then the limit is huge. In the billions, now (though I don't know the exact number). I'll make a guess of 16,777,215 (2563 - 1), though I could be wrong. If you're talking about anything derived from /atom, then the limit is 65,535.
In response to Popisfizzy
Popisfizzy wrote:
If you're talking about /datums, then the limit is huge. In the billions, now (though I don't know the exact number). I'll make a guess of 16,777,215 (2563 - 1), though I could be wrong. If you're talking about anything derived from /atom, then the limit is 65,535.


cool


although, you said anything derived from atom is limited to 65535?

so

atom/a{}

atom/b{}

atom/c{}


You can have 65535 of each a,b,c or 65535 atoms total between a b and c?
In response to Obs
Er, I kind of stated that without thinking. In total, each of those would add to the limit of /atom (as would /atom/movable). /area, /turf, /obj, and /mob also inherit from /atom, and they each have a 65535 limit, though the former two are odd in their behavior:
  • There can be a total of 65535 unique /turfs. That means, if you have to /turf/grass objects on the map, and they have all the same variables, the total added to the object limit is one. The limit for unique turfs is in the millions or billions.
  • /area is strange in that there will be only one type of each /area on the map. This means thatwhen you place an /area in Dream Maker's map editor, all the ones of that type are condensed into one at runtime. Likely, the limit for this is 65535 as well, but I'm not sure.
In response to Popisfizzy
Add to the limit meaning they increase the limit or add more instances of atoms that will eventually cap the limit?



Also, how is the uniqueness of a turf decided? If I add the same overlay to multiple identical turfs for instance, or set a variable for multiple identical turfs to be the same value, are all those turfs considered unique or do they get identified as the same?
In response to Obs
Obs wrote:
Add to the limit meaning they increase the limit or add more instances of atoms that will eventually cap the limit?

I'm not quite sure what you mean by this.

Also, how is the uniqueness of a turf decided? If I add the same overlay to multiple identical turfs for instance, or set a variable for multiple identical turfs to be the same value, are all those turfs considered unique or do they get identified as the same?

As stuff is added to the /atom.overlays list, it likely becomes a unique object. It's possible that groups with the same overlays are considered the same relative to eachother, but I'm not sure.
In response to Popisfizzy
Popisfizzy wrote:
Obs wrote:
Add to the limit meaning they increase the limit or add more instances of atoms that will eventually cap the limit?

I'm not quite sure what you mean by this.

Also, how is the uniqueness of a turf decided? If I add the same overlay to multiple identical turfs for instance, or set a variable for multiple identical turfs to be the same value, are all those turfs considered unique or do they get identified as the same?

As stuff is added to the /atom.overlays list, it likely becomes a unique object. It's possible that groups with the same overlays are considered the same relative to eachother, but I'm not sure.


Well I was able to put the same overlay on every tile of a 500x500 size map so I assume the overlays didn't make all the turfs unique otherwise BYOND would have complained. I'll do the same test now with setting a var and adding an overlay.


forget the atoms stuff