Ship Systems - Impulse Engines #228
alexanderson1993
started this conversation in
Feature Proposals
Replies: 1 comment
-
I think there should be a significant difference in maneuverability at impulse speeds vs. warp speeds, with it being much harder to change course at warp. I think it would also be helpful to have a "gravity well" zone around planets, based on their mass, in which warp engines cannot function. That essentially creates the equivalent of littoral zones, and these are areas in which strategic maneuvering and defensive positions can be addressed for a more tactical approach to combat. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For more information about the ship systems discussions, see #224
Impulse Engines
Impulse engines are used to move the ship in a forward direction at sub-light speeds.Impulse engines are intended for relatively short range travel, such as orbiting a planet or traveling between moons orbiting a planet. Impulse engines are not intended for traveling between planets, given it would take superluminal speeds to do so within the short time frame of a mission.
Like all ship systems, it's possible that different ships could have different kinds of impulse engines, each with different properties.
Impulse engines are controlled via a throttle of sorts, where the cruising speed is 1, and the throttle can be set anywhere from 0 to 1 - eg. 1/2 Impulse, 3/4 Impulse, etc. However, the speed can be set to any fractional value. This is called the "impulse speed" and affects both the acceleration and velocity of the ship.
Impulse engines also have an emergency speed, which is the maximum speed the ship can go when the throttle is above 1.
There are three major factors to consider with impulse engines: Acceleration, Velocity, and slowing down (Inertia).
Acceleration
Acceleration for impulse engines is determined by a "thrust" property on the engines itself, measured in kilo-newtons (F), and the mass of the ship (m). The exact formula is
a = F/m
. All things being equal, a more massive ship will accelerate slower than a lighter ship with the same thrust.While ship creators can choose whatever thrust value they want, as a general rule ships should be able to accelerate to the maximum speed within about 15 seconds.
The acceleration generated by the impulse engines is stored as a scalar on the impulse engines component and added to the velocity component every frame.
Velocity
The velocity of the ship is calculated each frame by adding the current acceleration to the previous velocity. The formula is
v = v0 + a * dt
, wheredt
is the time since the last frame.The impulse speed not only determines the thrust of the ship, it also determines the maximum speed the ship can go. The ship will continue accelerating until it reaches that maximum velocity, at which point the acceleration will become 0 and the ship will cruise at that speed.
Ship creators can pick whatever cruising and maximum speed they want for impulse engines, but as a general rule, cruising speed should be fast enough to get from the Earth to the Moon in less than 5 minutes.
A few things to consider:
Obviously, that's unreasonably fast, but it needs to be fast enough travel to all the places necessary to tell a story within a short time frame.
Velocity is stored as a scalar on the impulse engine component and combined with the current heading and the other velocity components to determine the position of the ship every frame.
Inertia & Slowing Down
I wrote a lot about this in this blog post and at the end of this update. Short answer: We don't respect inertia. It's incredibly complicated to understand for both crews and the AI that moves non-player ships. That means ships behave like airplanes - whatever direction your ship is facing is the direction it goes. A hand-wavey "Inertial Dampener" system can be used to explain this behavior to inquisitive crews.
An acceleration is applied to the ship equal to the current velocity multiplied by the reciprocal of the dampening factor (
d
) plus 1. So1 / (d + 1)
. This makes it so the dampening factor is just a positive number and we don't have to deal with reciprocals of decimals less than 1. If our dampening factor is 10 we're going 300 km/s and stop, in the first frame, we will slow down by 27 km/s. , then 24 km/s, etc. It's a logarithmic plateau which will eventually be cut off to 0 km/s.This will be based on the current velocity of the ship that is not in the current direction of acceleration. So if our acceleration is
{x:1, y:0, z:0}
and our velocity is{x: 21, y:5, z:2}
, our dampening acceleration will be{x: 0, y: 0.45, z:0.18}
.This has the side effect of automatically slowing the ship to a stop when the engines are not activated.
Power
The impulse engines will continuously draw power based on the amount of thrust they are currently producing. When the ship has reached the maximum speed for its current impulse speed, the thrust should be lower since the ship is only maintaining speed at that point.
Also, using any speed above cruising speed should require exponentially more power to accelerate and maintain the ship at that speed, to discourage the use of high speeds.
Heat
Heat is also based on the amount of thrust being produced, so there will be higher heat increase when the ship is accelerating than when it is cruising. However, the heat decline should be less than the cruising heat increase, to make it impractical to use the impulse engines continuously.
Also, using any speed above cruising speed should produce exponentially more heat.
Component Structure
The main
impulseEngine
component will have the following properties:The impulse engines are considered "active" whenever the target speed is higher than 0.
Heat and power properties are handled by the
heat
andpower
components.Interaction with Other Ship systems
Any comments, questions, clarifications, or counter-proposals are welcome. If I'm missing anything or haven't considered something, I would especially like to hear that.
Beta Was this translation helpful? Give feedback.
All reactions