More Visibility, and Item Rotation
Hey Folks! Hope everyone had a good weekend. Most of our weekend was, you guessed it, baby-related! Boy, they sure do eat up time. I did, however, get about 45 minutes to try out the Factorio demo. And, upon reaching the end, I threw some money their way. A very compelling demo! And since I kind of want interoperating systems on my spaceships, I thought it'd be interesting to see how other games handle them.
Last week's post about lighting and line of sight (LoS) prompted a fruitful discussion about the pros and cons of omniscient vs. single-avatar LoS for a crew-based game. We discussed merits of such games as FTL, Rimworld, and Prison Architect, and some of the gotchas to be watched for.
It's definitely given me some food for thought. One of the immediate changes it prompted was the ability for the LoS system to keep track of tiles that are undiscovered versus those that were previously discovered but are now out of sight. This way, a player could see the entire map of a ship they were familiar with at all times, but their LoS would restrict seeing things like creatures, fires, and other "live" data about a room. This is similar in principle to the NEO Scavenger hex map, where visited tiles are dimmed and one must be within LoS to see what's in it, while undiscovered hexes are black.
Ultimately, this is something that will require playtesting to nail down. It might not be fun to have limited view, and it might require LoS for all crew, or even omniscient view. But until I have more gameplay, I'll leave it with this NEO Scavenger-like map.
Putting LoS aside, I turned back to the items system. Specifically, item rotations. After looking into it a bit more, I was relieved to discover that the item data was easy to rotate. I was initially worried the item's grid-fitting data would require looking up a lot of special case fitting data, but it seems I can just rotate the item's grid fitting data without looking anything up. (Basically, imagine rotating a Lego so the brick's top dots are in the right place.)
It didn't take too long to get this working, though it exposed a bug in my array rotation code. Also, it looks like I need to do some translation offsets for the cursor when it is in item mode. The actual item grid-fitting position and cursor position become unaligned at certain rotations. Shouldn't be hard to fix, just a matter of finding the right offset calculations.
Once that's done, I should be able to place furniture against any wall. And then I can test interactivity (i.e. where AI must stand to interact with a rotated item). And beyond that, I think I'm due for some item/container code, so I can start testing items with limited supplies/charges (e.g. food cabinets, water faucets, etc.).
That's all for tonight. Have a good one!