ID:1655576
 
(See the best response by Nadrew.)
I read somewhere that the amount of objects in a world was limited to three bytes, Or 16 million and some.

That seems shockingly low to me, while some games it wouldnt be an issue, I've seen several which handle LARGE amounts of objects.

So how do they do it? Do they just happen to be a short, but safe distance below the limit? Or is there a workaround?

Do objects that are within other objects, Count towards this number? What happens to objects once there ARE 16 million instances already? Does something get deleted, does byond return a memory exception error message and crash? Or does the new object just get ignored?
Best response
If you're worried about ever having that many objects in a BYOND game at once you're doing something wrong.

Even the largest games on BYOND rarely use more than 40k objects at any given time, and that's without much management.

If you're really worried about it, you could write a system that loads and unloads things as they're needed (or not needed).

The count counts against ALL /obj types (including datums with /obj parent_type settings), including objects within other objects and things like that, as long as the /obj is initialized it counts.
I'm not really worried about it. Im just looking ahead. Having a cap at 16 mill isnt unreasonable, In fact most engines generally have lower. I was just curious.