Item Placement, and Reactors
Today's progress was impacted by a trip to town for some errands. Unfortunately, a shipment was late, meaning I had to sit around for a while and wait. So, I decided to use the time to work out some problems on good old fashioned paper. Namely, I wanted to see how I could represent complex equipment in the game. Here's the result
This is a crude representation of a nuclear reactor using simplified block elements on a grid (specifically, the cross-section of a tokamak's toroidal reaction chamber). Individual component squares are described in the key at the left, and their failure states are listed below.
I was trying to figure out how I could simultaneously let the player see and tweak complex equipment designs without needing to know nuclear and high-energy physics to do it. In this case, grid squares represent individual components of the reactor such as sensors, radiation shields, gas pumps, and magnets. Each piece serves a purpose, and if it fails, can cause issues ranging from fusion shutdown to containment breach.
The player may not understand how exactly this works, but they'd understand that the cooling superconductors, for example, are better if they cool more or use less energy, or even withstand more radiation before failing. So a player could theoretically see loot on another ship such as "Li-shielded superconducting coils" and look back at their existing "Unshielded superconducting coils" and think, "maybe these new ones would last longer?"
Similarly, if their reactor had a blown Deuterium pump, maybe they could turn up a replacement in a junkyard and install it, allowing them to power-up again. Or even keep a few spares on hand in the ship's cargo hold for emergencies.
The point of this is threefold.
First, it gives players a chance to tinker with ship designs in a more meaningful way. Instead of swapping "fusion reactor mk1" out and replacing it with "fusion reactor mk2," they can fine-tune the performance of their ship to their own tastes. Games like EVE Online allow ship mods, but they're limited to a few hardpoints and off-the-shelf systems. Gearheads like to get in there and mess with the guts.
Second, this makes failure more interesting. "How did your last character die?" "Well, the Lithium tank blew when we were en route to Jupiter, unloading gas all over the engine room. We were able to contain it by locking the room down, but the pressure drop caused radiation to start escaping the reactor. We either had to shut down the reactor and hope for a rescue, or limp with an unshielded reactor and hope we survived the rads..."
Third, I like this kind of stuff. Realism in sci-fi is more interesting to me than hand-wavium, and I love it when I'm playing a game that treats the subject matter with respect. And bonus if I can inspire players to learn more about these things (or even subtly trick them into learning)!
This may be pie-in-the-sky, but this seems a bit more workable than my original idea. (Which was basically to simulate all the science down to the atom. Yeah, I know. I have a problem :)
In other news, once I got home and back to my computer, I jumped back on the item placement problem. There was still a niggling problem of accurately showing where the current item would drop into the ship as the cursor moved around while at a non-zero rotation. This was just a matter of adjusting the item's offset for the rotation.
Then, just as I was about to start working on items-within-items (i.e. containers), I realized I should probably add some UI helpers to make my life easier. Namely, I need to see the current item's grid fitting rules and how that fits the ship underneath. Since containers will be leaning on grid-fitting a lot, it makes sense to tackle this first.
So I started work on a sprite overlay that shows me per-grid-cell fit feedback. This way, I can visually tell which tile is blocking the item I'm trying to fit, instead of tracing through code and checking each cell.
That's probably where I'll pick-up tomorrow. Have a good night, all!