ID:1114608
 
Hey guys,
There are some things about map design that always confused me so i would like some insight from more experienced developers.

Is there a difference between a /turf and an /obj other than the density?
For example should a building be under /turf with density set to 1 or an ordinary /obj? and what about a Tree or a mountain or a couch??

Is there a set of rules or guidelines on type should a certain thing in my game should be?

thanks ahead
A turf is generally used for static backgrounds and tilesets, such as grass, buildings, etc. Turfs cannot move.

An obj inherits from /atom/movable, meaning it can move. Objs tend to be used for interactive things, such as levers, items, etc.

You should be mindful of the limits on these two things the compiler has in place. You can only have 256^2 (65,536) /obj and /mobs present on the map at compile time, though at runtime you can have up to 256^3 (16,777,216). You can have up to 16,777,216 turfs present on the map at compile time, making it more suitable for tilesets and backgrounds.
As LordAndrew said, anything that moves must be an obj. You can only have one turf per tile, so anything that exists "on top of" something else should be an obj as well. For example, a bench that could be placed either inside or outside would be an obj, while the grass or floor it is on would be the turf. Turfs generally have icons that fill the entire tile without any transparency since there cannot be anything behind them*.

*DM appears to let you break the one-turf-per-tile rule by stacking the turfs' icons using underlays. Utilizing this can lead to some confusion though, if you don't realize that there is actually only 1 turf.
I see, that's helpful thanks .

One more thing, Is it better to use large z-levels or should I break them into many smaller ones.
For example, one z map that will hold all the kingdoms of "Middle Earth" or one z level for each kingdom ? what is the better practice?

In response to Biond_coder
It's more or less up to preference on whether or not to use huge maps or small maps sectioned by z-levels. Both of them use about the same memory space if I recall.

Of course, a few things to watch out for is that the native maximum size a map can be is 1000x1000 tiles, so if you plan on having maps larger than that you'll need to use z-levels. It's also worth noting if you have multiple map files, at runtime they'll be folded into one map, each on a different z-level.