Sunday, June 16, 2013

StarWright - Power

Over the past couple of weeks I implemented one of the last remaining starship simulation mechanics that I had planned to create. This mechanic has to do with providing power to all the various ship systems.

The power mechanic works very similarly to the existing ammo mechanic. If you don't recall, the purpose of the ammo mechanic is to require the player to carefully balance weapons (which consume ammo) with ammo supplies. The closer the ammo supply is to a weapon, the faster the ammo can be delivered, and the faster the weapon can shoot, so the player has to think carefully about where they place weapons and ammo supplies relative to each other. While I've found that this mechanic is successful in giving greater depth to the design of small, localized areas of ships, it adds little depth to the overall design of larger ships since ammo rarely needs to be transported more than short distances.

The power mechanic is intended to complement the ammo mechanic by providing greater depth to the overall design of larger ships. Power works similarly to ammo in that many ship systems (currently thrusters, ammo supplies, and the cockpit) require power to operate. And just like ammo, power "batteries" (for lack of a better word) must be hand-delivered by the ship's crew to the systems that need power. But power is different from ammo in the distance that batteries travel, the rate at which batteries are consumed, and the cost of creating batteries. Ammo is consumed very quickly during combat, but ammo typically travels only short distances, since ammo supplies are cheap enough that any well-designed ship will have one for every few weapons. Producing batteries, on the other hand, is extremely expensive due to the very high dollar cost of the "reactor core", a new ship part that produces batteries. The reactor core is so expensive that most any medium-size ship will only have one. Thankfully, power-consuming systems need fresh batteries fairly infrequently, so the potentially longer distances between the power core and power-consuming systems is not as big a deal as it would be for ammo. However, the distance that power has to travel is still a major consideration when designing a ship, so choosing a relatively central and protected location for the reactor core and keeping traffic congestion low is very important.

Here's a screenshot showing a power core and glowing batteries being carried to some nearby systems:

As I mentioned above, the ammo supply now requires power to operate. You can see the new redesigned ammo supply and thruster artwork in the above screenshot, which clearly shows how many batteries the thrusters and ammo supplies have remaining. Since producing ammo now requires power, power is now the most important resource on any ship. Without it all your systems will eventually become non-functional.

Reactor cores are very expensive, but they can produce an unlimited amount of power. Sometimes when designing a ship, you may find it beneficial to have a closer source of batteries, but you don't want the huge added expensive of another reactor core. The compromise solution is a "battery storage" which can be seen in this screenshot:

A battery storage room does not itself produce batteries, but it can store up to 15 batteries in case of an urgent spike in local demand for power. When all 15 batteries are used up, then any additional batteries must come directly from the reactor core, or the battery storage must be re-filled from the reactor.

If you think it's weird that power must be carried by hand instead of over wires, then I admit you're right. This is a design decision where I have deliberately compromised realism for the sake of deeper ship design and a more transparent simulation. The ship design is deeper because batteries make large-scale ship design decisions and corridor layouts more meaningful. And the simulation is more transparent and understandable because, rather than having some abstracted representation or numbers for power levels, you can actually see how power travels throughout the ship as it is being carried around by the crew.