AutoTile V2, Scale, and Items
I worked on a refinement to the autotiling code today, and I think it's in a much better place now.
Instead of the tiles that had to specify all possible neighbor tiles, I now have it setup to define the type of all possible neighbors. So a wall will only allow connections to other wall types, for example, instead of having to list each possible wall it could connect to.
The benefit of this is that it has made a tremendous difference in ease of maintenance for the data. I was quickly able to take yesterday's 1x1 grid tiles and add multiple new variations of the corner piece styles, and it was simple to hook up and get working. Good for the dev, and good for future modders!
I also decided to try switching the tile size from 10x10 pixels to 32x32 pixels, to match the size of the current crew sprites. Even with just a hacky scale-up in Photoshop, I think the matching scale makes a huge difference. Things look way more consistent now, and the crew looks like they're wandering a space meant for them, and not just icons on a map.
I also think that 32 pixels may be a good size to start from. Originally, I went with 10x10 because it was easy to knock-out a bunch of tile graphics. However, 32x32 leaves more room for detail and style. It'll be more work to make the art, but I think it'll be an improvement, visually. (Both in quality and ease of visual recognition for different sprites.)
As such, I think the working scale is going to be 1 pixel = 2cm. This means that a grid square (32 pixels across) is roughly 64cm across, or roughly 25 inches. Wide enough to accommodate a standard human's shoulders. This means a single grid square can contain things like a sleeping space, a seat, or other human-centered object. It may need tweaking down the road, but we'll see how this works for now.
Finally, I've decided to get started on shipboard items. My first item is going to be a sleeping berth for crew. And I've decided to make it a placeable item rather than a tile. The reason for this is because I think I'm going to need to rely on existing crew interaction/condition system to deal with crew interacting with objects, too. E.g. an "interaction" with a sleeping berth may be an 8-hour duration task that increases rest while decreasing other stats.
Using this system means I get to piggy-back on some useful features, like crew querying the map for available things to interact with, and the whole concept of "busy." And since it uses the condition system, items can apply any effects to the crew I need it to, and vice-versa (e.g. crew gets rest, and bed gets soiled).
I may still need to work on some specific tile-based items, but for now, this seems like it'll cover my needs.
That about does it for this week, though. It's beer o'clock in the Fedor household. Have a good weekend, all!