Sorry about no post last week. The holidays made everything weird.
We’re at a weird stage of development where we’re putting some polish on almost everything. These are the sorts of things that are difficult to quantify on a roadmap.
Things like tables.
Tables
Tables are the objects that colonist use to eat.
They look like this:
(This time I used the actual website background color and not just 0,0,0 black. You’re welcome, people with amazing contrast ratios)
Tables come in 3 sizes:
Small (1x1)
Thin (2x1)
Large (2x2)
Table Slots
It seems reasonable that 1 colonist can use the small table (because otherwise the table would be useless).
The thin table is twice is large, so it should allow 2 colonists.
The large table is four times bigger, so it should allow 4 colonists.
Roughly drawn out, you would expect that a colonist could use any of the following locations (in blue):
Internally, we call these areas “table slots”
Table Slot Access Position
It would be insane if a colonist walked to the wrong side of a table and food magically appeared far away (at the correct location).
So every table slot needs a set of access position.
(You can read about access positions—and toilets—in a previous post)
The table access positions are in blue. The table slot access positions are in red.
You can ignore the arrow direction in the middle of the table. We use that to consistently place access positions to the front and to the left.
Every table has a different set of access positions.
The small table can be used from any side, so its 1 slot has 4 access positions.
The thin table can be used from 3 sides, so its 2 slots have 3 access positions
The large table (shown above—and below) can be used from only 2 sides, so its 4 slots have 2 access positions.
Table Chairs
We treat chairs that are next to tables as special.
We have to call them something, so we call them “Table Chairs”.
Table Chairs are always prioritized by colonists when they’re looking for a place to eat.
The priority is:
Table Chair (sit at table)
Table Slot (stand at table)
Chair, without table (sit at a chair not at a table)
Floor (stand and eat)
The “table chair” system allows for a few different chair layouts.
By the way, in the above image I could have placed 8 chairs around the table. Every chair would still work, but only 4 table slots exist. So the first 4 colonists would place their food on the table. The remaining 4 would eat at a chair but not technically at the table.
This isn’t ideal, but the tables are too small to fit 8 food sprites. And if 8 colonists can sit at the big table 2 should be able to sit at the small table.
Internals
In order for this to work, every chair has an invisible child agent that gets placed in the “seated” direction of the chair. (this is why we recently converted the cafeteria chair from a sprite into a 3d model and gave it a back).
Internally, there’s an entire system devoted to stacking objects on top of each other. Colonists use the stacking system so that they know which floor they’re on top of. Wall sides use the stacking system so that they know which room to use for light.
Food Position
Each table slot is responsible for displaying food (and whatever else a colonist places on a table).
Table slots, like everything else, use our component system, so displaying food is no different from displaying crates on a shelf.
But it’s still something that we have to spend time on, so here I am talking about it
(I also wanted to provide some context before I showed this picture of a colonist eating at a table)
That’s It
Tables, table slots, chairs, a fish. How exciting.
These are the sorts of random things that we do throughout the week.
By the way, we do more than 1 thing a week, but I think it’s more interesting to get into specifics about just 1 thing.
(I chose to write this dev blog instead of playing smash. This is how I show that I love you)
-Tyler