← All posts

Project archive

Ship power management begins to become playable

This explosion in a pasta factory is actually the data-processing logic. What does it become in the game?

It processes the operation and states of ship modules. The mechanics for accounting for all of a ship's power use and generation are now fairly well debugged.

Batteries charge when there's a surplus and supply power when there's a shortfall. Solar panels generate power according to the ship's position relative to the star. All statuses and warnings, as well as general operating parameters, are displayed.

I'm particularly pleased that all this works universally, with any number and combination of modules.

During testing, beyond Mars's orbit the solar panels stopped providing enough power, and the ship switched to batteries charged while it was flying closer to the Sun. It reached Jupiter on battery power. There was enough. Eleven modules consumed 20.5 kilowatts, while the panels generate 60 kilowatts in Earth's orbit. There is a caveat: the little ship is very fast. Normally, such a drop in power beyond Mars's orbit would probably be catastrophic. In Jupiter's orbit the panels produced 2.7 kilowatts, while one life-support module alone needs 6. After that, I added an external power connection. The ship can now draw power and charge its batteries from an outside source. Docking status will make this possible.

In short, the boring mathematics and algorithms are gradually turning into playable elements.

I also managed to write about half the operating logic for the life-support modules.

P.S. I need a volunteer for a small astronomy research task.

Project Facebook profile ↗