Unified Planet Aerodynamics Suggestion [SE2]
I had a bit of a boredom induced energy dump, and am seeing multiple people ask for flight models on planets, without offering much in the way of a "suggestion" other than they think it should exist. Following in other game's footsteps would be complex computationally, and probably not fit the style of this game very well. So, I have come up with a method, based on wind tunnel models rather than true-to-life aerodynamics to simplify enough for game/code purposes (Which also happens to allow large brick ships to function!), while being realistic enough to let planes, helicopters and drones fly. Here is my 3-step flight model calculation.
First off, code based Constant. This variable Constant will represent, roughly, the density of an atmosphere. 0.5 would be Earth-like air pressure at sea level, and 0 would be space. If a planet's atmosphere is twice as dense as Earth's, it's a 1. Easy enough!
Secondly; Drag. Drag can easily be calculated in numerous ways, but I'll give two. Drag simply reduces the efficiency of thrust, meaning more fuel usage and less speed.
- Option A, you assign each block a drag coefficient (where a flat front has the highest drag). Or more accurately, I guess, assign specifically slanted blocks with less drag.
- Option B, all blocks opposite the current thrust vector are inspected for surface area. This one is more accurate, but obviously more computationally heavy.
The overall drag is the result of (total coefficients, or total exposed surface area, etc.) multiplied by the inverse of altitude (As resistance diminishes with thinner atmosphere). This is all assuming, of course, that these methods do not already exist in the game's code. I figured I would cover all my bases, just to be sure.
Thirdly, a very simplified (but comprehensive) Lift model. Lift is determined by, simply put, speed and surface area, modified by altitude.
To do this, we want to take the surface area of all blocks perpendicular to the current direction of travel. So if we're holding W and moving forward, our relative top and bottom blocks exposed to air are being looked at, which would automagically include a structure such as a wing.
Then, we simply note the speed of the object moving. After multiplying these two together, you multiply by the variable assigned to the planet; Again, Earth-adjacent planets would be roughly 0.5, and large moons or planets with extremely thin atmospheres would be close to 0.
Take the resultant number and divide by the "weight" (approximated by blocks on the grid). This divided number gives us an easy to use lift ratio; Greater than or Equal to 1 allows hovering and flight. Added benefit that large ships with lots of thrust can still enter atmosphere, making more Sci-Fi oriented designs feasible. This (should) account(s) for going below sea level, helicopters (presuming the game engine can interpret rotational energy as "speed" independent from the grid the rotor is attached to), and small drones such as for mining while within any given atmosphere.
Lift = Surface Area × Speed × Constant, then divide by total weight.
Easy!
How do you account for a vessel being at the interface of two mediums?
This is most seen with boats where half is submerged in water and half in air.
And note that at the interface there is surface tension which adds to drag, could be ignored.
How do you account for a vessel being at the interface of two mediums?
This is most seen with boats where half is submerged in water and half in air.
And note that at the interface there is surface tension which adds to drag, could be ignored.
Replies have been locked on this page!