Auto-Tiling Conduits

Hey Folks! Hope everyone had a good weekend. Ours was very, very outdoors. And I've got my vitamin D quota for a long while, I think.

Back at work, I set about a minor task I've been meaning to do: add auto-tile ability to certain items. Namely, conduits and walls.

Up until now, if you placed a conduit, there were two pieces. A 2-way pipe, and a 4-way junction. I once also had an "L" shaped corner piece, too. And if you wanted them all to line up, you had to carefully choose each piece separately, and place them by hand.

And for a wall? There's only one wall block. And it looks the same everywhere.

Long-term, I wanted that to be more versatile, and easier on the user. I wanted thinner wall pieces that could auto-form junctions, and similarly, have conduits snake around the ship without requiring paintstaking placement.

So I've nearly got that working now. I've setup a specialized item variant that uses a sprite sheet (see the right side of today's image), and it shows one of those subsections of the whole sheet at a time. Some code checks the surrounding tiles to see what fits best, and uses that.

I say "nearly" because there are still some edge cases. (Perhaps literally.) Most of the connectors look right. But I occasionally get one that seems sub-optimal. Like it's connecting to the existing pipes fine, but also connecting to one I cannot see. Maybe there's some data getting left in the tiles after an item is removed?

Anyway, a few more kinks to sort out. But once they're done, I'll convert the walls to use this, too. And either now or later, I might add interior and exterior cladding for walls, to control things like comfort (interior) and heat/impact/rad shielding (exterior).

Tags: Ostranauts


Asthepanda2iscool2's picture

So no more painstaking conduit placement? Nice.
Although, what if you want to select a certain sprite (and conduit flow, I guess)? Could there be a drop down menu of sorts to designate the desired form? I figure that ultimately it doesn't matter, but it would probably help aesthetic-wise.

Also, my weekend was also outdoorsy, but Michigan weather seems to hold an unprecedented level of animosity. The tarp over my hammock got ripped from it's stakes by the wind, and everything got soaked. Needless to say, I ended up drinking a lot of instant coffee next to a very built up fire.

Also #2, in regards to the artificial gravity segment of your video, I was wondering how gravity would work in combat scenarios, or slow encounters (where the ship must slow to a crawl in order to progress, thus lowering acceleration forces). Again, a nit-picky detail with possibly little consequence, but one that has aesthetic importance.

Rar! Rar rar rar! Thanks for reading :)

dcfedor's picture

I think that in most cases, the auto-tile should choose the only option that fits. Any other option would appear to break the chain and/or connect to empty space.

The one exception I can think of is if you wanted two parallel, but disconnected, lines. And I'm thinking that if cases like that come up often enough, there are some workarounds we could introduce. (E.g. custom pieces, or an "A" and "B" set that don't intermingle.)

Sounds like the weather's been pretty crazy out east! Winds, rain, heat...almost like the apocalypse is coming :)

For gravity, I'm hoping to have a micro-g system to control movement and some light physics when not in a grav well or under thrust. I have no idea how it's going to look yet, but it'll be fun to try!

Dan Fedor - Founder, Blue Bottle Games

KathleenStanhope's picture

An auto tiling mechanism is rushed for the middle of the chances for the candidates. Auto tiling is met for the top of the bestessay review for all people. The style is held for the argument in favor of the automatic mechanisms for all portals for the scheme.