DF Geometry
This is part of a conversation on http://www.df-21.net/ubb/Forum7/HTML/000018.php, and explains certain things about sectors and how they interact with each other.
AlexG Mousebot
posted July 15, 2001 13:06
Okay... you've been very helpful in instructing me in using the forums... thank you for that. I was wondering if you could help me with something else that's driving me nuts ... I have tried many things and I cannot seem to make things in the middle of a sector, like cargo boxes, control pannels (like that desk in "secret base" that the switch to get to the Death Star plans was behind), etc. "Subsectors" are never visable and the player can walk right through them - same with "new independent sectors" within a sector. I even tried "Gap in current sector, and that one was visable and could not be walked through. The only problem was that it went right to the ceiling, and I couldn't select it to adjust the height without selecting the sector it was in. HELP ME... PLEASE!
japh (Imperial Commando)
posted July 15, 2001 14:32
A gap in current sector means inside walls. Naturally they extend from floor to ceiling.
Keep in mind that DF is 2.5D, not 3D. The third dimension is purely a location on the Y axis at which floors, ceilings, 2nd altitudes (invisible floors/river beds), and objects can be placed.
Sectors do not intersect except along edges (walls). One edge of one sector and another edge of another sector overlap, with the outer sides facing each other (the inner side has a perpendicular line whenever the wall is selected). Then you right click and select adjoin (or press 'a' to adjoin all the edges that overlap the selected wall, or shift-a to adjoin only the overlapping edges on the same layer as the selected wall). An adjoin is where two sectors meet. You can see/pass/fire from one to the other, provided all the ceilings are above all the floors (and barring wall flag limitations).
It's all 2D. Do not think in 3D except to set altitudes. Effectively, you think half-2D-half-3D, i.e. 2.5D
This is why two overlapping sectors do not interfere with one another. I dunno what happens when you place an object in the overlapping space. DF probably does something that's 100% logical and 50% wrong.
Most real-world levels will not have sectors overlap like this, because in the real world one region cannot contain two "things". This gets horribly close to philosophy or quantum mechanics, so don't think about it much.
Note that sectors *can* overlap real-world-wise if the ceiling of one is below the floor of another. Note also that for a sector to have a floor above it's own ceiling is weird, except for control sectors which are closed and cannot be entered except by cheating.
[Addendum: Sectors which overlap real-world-wise are best kept on separate layers to avoid confusion]
Now a subsector is really a gap in a sector, in which you can create an independant sector, and then adjoin the independant sector.
When you create a subsector, the inner sector's floor and ceiling, and in fact all other attributes, are copied from the "current sector" i.e. the one in which you're creating it. Be sure to select the sector inside which you're creating the subsector before you create it, otherwise strange things may happen.
As the attributes are the same, the sector isn't really visible when playing (unless you do LACDS twice). So set its floor altitude 4 higher than (add 4 to) the "parent" sector's. This will create a nice table/panel/whatever.
Hope this helps. Anyone want to include this in a tutorial or something (in the appropriate DF21 section maybe), feel free. Put my nick on it.
Textures:
When sectors adjoin, the common parts of the walls are adjoins. The top texture of the adjoined wall is what appears above the "window" into the other sector, and the bottom texture is what appears below the window:
| top tex | ------------+--------------+---------------- other | "window" to | other wall wall, | adjoined | unadjoined | sector | mid tex | | -------------------------------------------- |bottom tex |
The top texture is visible only up to the ceiling, of course.
END