Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New SS13 Remake Attempt
#15
If I were going to simulate atmospherics from scratch SS13 behavior I'd probably do something pretty similar to the current system (which AFAIK tracks gas on each tile), but on the level of room<->room instead of tile<->tile.

So instead of "(0, 0) transmits x amount of helium to (0, 1)", "Kitchen transmits x amount of helium to Kitchen Vent 0." That makes it a little more expensive to figure out what's neighbor to what, (probably I would either calculate it from programmer-indicated map zones or, more likely, make map designers specify it manually based on zones they draw on the map) but you're doing so much less propagation it shouldn't matter.

If we could guarantee things about the shape of rooms like "always a rectangle where the whole edge is a boundary to the room on that side" and keep track of what's transmitting what to each room, we could extrapolate what gas is on each tile by figuring out where it falls on a gradient between the neighboring rooms. So long as you calculate that only as-needed (assuming that most of the time there's no reason anyone cares about the gas composition of most tiles), and so long as there aren't too many gases in play at any given time, it's probably a pretty simple computation. (as an average between k neighboring rooms and one current room, the gradient trick is probably (k + 1) additions and 1 division, for each gas)

You could avoid a lot of that computation by just making the gas composition of each room totally uniform, and making rooms small enough that doing that doesn't affect gameplay. I think that's much less cool though and likely to confuse people if they can't tell where gases are coming from. Of course, you could cheat even further from there and split each room automatically into five subregions -- one for each edge and one for the center -- so that by inspecting edges, players can figure out where a gas is introduced from. All of these are just equally-valid positions on a sliding spectrum between "one gas composition per room" and "one (just-in-time computed) gas composition per room."

Some caveats that fuck this over: not being able to tell who needs the gas composition of a specific tile at a specific time; overzealous scripts asking for the gas composition of more tiles than they strictly need, because they're poorly optimized.

This is probably a pipe dream though in current SS13, and I don't know if all the performance assumptions I mentioned will actually hold water. I might try to throw an implementation together although I don't actually know BYOND at the moment. (how hard can it be?) Based on what I just posted anyone could probably code the same system or determine if it would work/meet SS13 design goals, because the idea (if not implementation on existing engine) is really simple.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)