Painting Tiles and Autotiling

I managed to get the autotile to roughly do what I want today, but it's far from perfect.

Early in the day, I figured out a few of the bugs that were causing weird autotiling to happen when painting. It turned out to be a mix of bad data in the tile connection stats, and adding a "priority" field to each tile, to control which tiles are preferred over others. With these fixes in place, I was able to paint just about any tile and get the surrounding tiles I expected.

However, this only handled the four orthogonal tiles around the painted tile. I.e. top, bottom, left, and right. The corners are ignored.

My next step was to expand the code to also try and figure out good fits for the corner pieces. This wasn't too hard to do, especially since the tile connection rules still only apply orthogonally. Basically, I don't have to check that diagonal tiles match sides, because the tile matching only matters in horizontal and vertical directions.

Once this was done, I was able to paint floor all over the screen, and see walls fill-in around it. I could even do winding, snaky corridors!

The bad news is that other tile types seem to screw the system up. Painting a solid wall, for example, seems to add empty space in the middle of floor if it gets too close. And the eraser tool seems to leave more garbage than it picks up.

I'm also starting to wonder if it may make more sense to approach the ship design differently. Instead of updating the walls instantly each time a floor tile is painted, maybe I should let the user just paint floor everywhere, and when they're ready, have the computer auto-tile walls around it? This way, the computer won't screw up player-painted tiles as they're working, and also doesn't waste as much processing time. The inverse could also be true: paint the walls and fill in gaps.

However, I suspect that even with this alternative painting style, players will still want to tweak the ship layout after the computer autotiles it for them, possibly in real-time.

Whatever the case, it definitely needs more testing and tweaking!

Comments

matsy's picture
matsy

Would the player be able to design and build their own ship? I don't think I've heard you mention this idea before. It is something I would enjoy doing, but isn't it a step away from the player being a part of the crew rather than the leader/creator?

I would think a system like Prison Architect or Gnomoria could work well. Players draws down areas in a blue print mode to identify specific areas e.g. Engine Room, Quarters, Medical Bay etc and then switching out of to your wall / real time mode the player could then add in Doors, Air Locks, Port Holes etc.

dcfedor's picture
dcfedor

Yeah, that's the idea. Design and build spaceships, and fly/manage crew.

You're right that there's a bit of a role disconnect between one mode and the other, and I'll have to see how that plays out. I'm hoping that the detailed ship design aspect can intersect the ship captain aspect in ways like Han and Chewie, or Kaylee and Mal, tweak their ship designs. E.g. replacing sub-systems, removing safety systems for better performance, adding smuggling compartments, etc.

I've always enjoyed ship customization in other games, but eventually became frustrated with limitations in parts or ship layout. I'm hoping I can expand the options a player might have for this kind of customization.

And there will be certain players who simply enjoy trying out different ship designs to test them out.

Dan Fedor - Founder, Blue Bottle Games