Terra Invicta Dev Diary #17: Rocket Science
Posted: Tue Feb 01, 2022 6:59 pm
This dev diary will get into the meat of the overall design, but I want to say at the outset that what players will face is a straightforward set of questions. All the nasty math will take place under the hood, and you can focus on strategic decisionmaking, and let the game take care of the rest. The questions are:
1) Where do you want to go?
2) How fast do you want to get there?
3) How much of your Delta-V are you willing to burn?
Questions 2) and 3) contain, as you might expect, a tradeoff.
Your fleet’s ability to accelerate, the distance between your origin and destination, and the force of gravity at the origin, destination, and points in between are all primary determinants of how long a trip can take. A space ship’s acceleration is a product of the drive it is using and its mass.
Delta-V measures how much a space ship can change its velocity. In space, with almost no organic way to slow down, a ship will keep going unless you apply some acceleration in the opposite of its direction of travel. It’s also a normalized value that can represent all kinds of propulsion systems and propellant – a way of comparing today’s conventional rockets to nuclear drives and far-off notional stuff based on fusion or antimatter.
So: You want to send your brand-new corvette from your shipyard in High Lunar Orbit to your propellant depot orbiting 433 Eros. Here’s what it presents you:
The slider lets you trade Delta-V expenditure for travel time.
To figure all that out, the game has to calculate the ship’s interaction with gravity around the moon, then Earth (when it leaves lunar’s sphere of influence for Earth’s), then around the Sun, and finally around Eros. It’s also calculating hitting a moving target from a moving origin – and determining whether it would be wiser to wait a bit at the origin until the destination is in a more favorable location.
The relationship between thrust, thrust duration, and gravity determine the primary “shape” of a trajectory. Terra Invicta models three types of trajectory, each governed by their own math:
• Impulse conics: These are for high-thrust, low-efficiency drives, and are probably most familiar to players of Kerbal Space Program and fans of modern space travel. Chemical and many fission drives will use these.
Fleets launch by very quickly burning a great deal of their Delta-V to put themselves on a conic-section-shaped trajectory – basically building an elliptical or hyperbolic orbit they can coast on until they reach their destination, at which point they burn again to match velocities with their destination and enter a stable orbit there.
Fleets with more Delta-V can get to their destination faster by building tighter conics that spend less time coasting, all the way up to highly eccentric hyperbolas that look almost like a straight line. We use a beautiful piece of math called a “Lambert Solver” to help calculate these.
While the ever-changing relative positions of the planets impact the duration and propellant consumption of all trajectories, impulse conics are particularly sensitive to launch windows – times when the positions are favorable or unfavorable for fast or efficient movement. But we’ve got that handled, too -- the game will test and offer you trajectories in which you loiter at your origin until a good launch window comes up, if those are faster or more efficient with propellant than immediate launches.
• Microthrust spirals: These are for low-thrust and typically high-efficiency drives that have lots of Delta-V but very little muscle to use it. Electrical drives will use these, and, surprisingly, sometimes more powerful drives – even fusion -- will need to operate on these trajectories to escape from powerful gravity wells.
Essentially, if a thruster can’t overcome the local acceleration due to gravity (whether from a moon, asteroid, planet or the Sun), it has to engage in a long, slow spiral from its origin, burning constantly to build toward having enough velocity to escape the local gravity.
We can’t promise every ship you build with electrical and other low-thrust drives will be militarily useful, but we wanted to model the entire range of notional propulsion systems and let you sort out what works best for you.
• Torches: For powerful, advanced drives with scads of Delta-V that can maintain near-constant high thrust throughout the Solar System and not care much about measly gravity. Ships move on a straight line toward their destination, accelerating most or all of the way (with maybe some coasting in the middle to save juice), and then flip and decelerate tail-first to match velocities with wherever they are trying to go.
This is the type of drive behavior portrayed in the Expanse television series.
In some cases, the same ship may use different propulsion models based on specific conditions. A drive may behave like a torch in a low-gravity environment, such as hopping between asteroids in the Belt, but will operate in a microthrust regime near Earth or Jupiter. Or, if you are far from a favorable launch window, the game will check to see if the ship has the Delta-V to perform a torch trajectory instead. And drives may operate under different models in different parts of the same trajectory as conditions change.
As you can imagine, drive techs play a major role in your expansion in the Solar System and flexibility to meet alien and human threats. And a support network of propellant depots at various locations make sure your fleets can keep moving and be ready for combat.
An aside: Our dev in charge of implementing all this mathematical wizardry is TauCeti Deichmann, a talented game designer in his own right. Check out his trading game Sidereal Confluence on the Geek!
We’re hoping to have Tau write up a future dev diary where he can dig in on the details of his efforts.