wall-nerds / wallening

A group of /tg/station devs attempt to 3/4thify ss13
https://www.tgstation13.org/
GNU Affero General Public License v3.0
9 stars 4 forks source link

You can see both sides of horizontal shutters #242

Open MrMelbert opened 2 weeks ago

MrMelbert commented 2 weeks ago

image

I suppose this is a limitation of the way they're set up, a little odd though.

LemonInTheDark commented 2 weeks ago

This is in theory solvable, though the more you try and solve it the more annoying it gets.

Problem 1: The shutter is on the tile we're seeing, but we only want to see half of it

Solution: Overlay each shutter segmenton the turf it is adjacent to, like we do for walls (this breaks things like dragging though so it might need a component or someodd to manage it)

Problem 2 (I want this more): We can see the inside of the turf the shutter is on (the same applies in many other places, such as airlocks and other "not all there" objects, though it is FAR easier to implement for airlocks.

Solution: We basically are trying to implement directional opacity here, which is ANNOYING. I think the solution is a lot like the above but more stupid.

This is going to look a lot like emissives and emissive blockers. On the center turf, overlay a wall sized bit of blackness (32x48) on its own plane (we'll call it the sight blocking plane) On each side (top/bottom or left/right), overlay a copy of the part of the door on that side onto said sight blocking plane, with BLEND_SUBTRACT.

We'd need to add little dividers on the edges of shutter chains so we could have a visual reason why you can't see through the ends, but that'd do it. (could then do the same thing to them).

I think that'd just like, work. Only thing I'm not confident in is showing mobs inside horizontal shutters to themselves, but I think in terms of visual issues that's less of a big one.

I would like to extend this tech to at least airlocks, since they're a less troublesome usecase and I think it'll make a significant impact on the visuals of the game.