A downloadable prototype for Windows

The Thing That's Been Driving Me Crazy In Every Space Sim I Play

This is how spaceships should land. Special effects people will typically base it on how helicopters land since that's an obvious reference point and people have an intuitive understanding of what that should look like. Most movies will get this right, or at least have their heart in the right place if they do it wrong.

Almost every space game gets this wrong. The reasons why are complex. It's a delicate confluence of physics, control schemes, and game design requirements. Star Citizen is probably the biggest offender. Landing in a smooth and "realistic" way is so difficult, requiring you to essentially fight the game's physics and controls, that there is a whole subcommunity that competes to make the most aesthetically pleasing "cinematic" landings.

What if you built a space sim where the cool sci-fi Star Wars blended vertical landing was not only encouraged by the physics and controls, but even optimal? Is that possible? Does it necessarily sacrifice the ship being flyable in other regimes? I don't know, but I want to find out!

The Prototype

First things first, this is the prototype for whatever this ends up being called. There will not be any more development on this, and the codebase for this is kind of long gone because I didn't start version controlling this project until a few weeks after.

Since this was a sort of "spite project", it was critical to me that the ship can fly comfortably in forward flight in addition to the cool landings. It wouldn't be fair for me to say I made cool ship physics that can land in a cool way, if that was the only thing it was capable of doing. A real game would need to handle longer distance flight and ideally space-flight. This prototype doesn't do space flight (though WIP game does though) making it I think one of the more interesting blends of physics and flight controls I think I've ever made.

Controls (Requires a Gamepad!)

ControlGamepad Input
Pitch/RollLeft Stick
YawBumpers
Toggle Auto HoverA
Cockpit ViewX
Chase ViewY
Flyby ViewB
Fixed CameraB (Hold)

The Flight Modes

The control scheme is built around two different flight modes. Neither is meant to be flown exclusively. The two modes are designed for different parts of the flight, and flying only in manual, or only in auto hover, is not recommended.

Manual ModeAuto Hover Mode
Design GoalForward flightLandings
TakeoffsVertical, blending into forwardsVertical only
LandingsDifficult to use for vertical landings, can be used for horizontal landingsCapable of precision vertical landings
Flight StyleLike an airplaneLike a helicopter
Throttle Input"Set and Forget" like an airplane"Momentary" like a spaceship
What does the Throttle do?Controls primarily the main thruster for forward flight, but at low speed blends the lift engines in for takeoffs and landingsControls the vertical velocity of the ship, and automatically slows it down when near the ground for smooth landings
What does the joystick do?Pitch and roll like an aircraftPitch an roll blended with yaw, automatically limited and centering so no stick pressure results in neutral attitude

Manual Mode (Forward Flight)

When not landing, and when moving over long distances, this is the mode you should be in. In this mode, the throttle (mostly) directly controls the main engines, providing you forward thrust to fly like an airplane.

Lift

The ship uses a basic form of wings to provide both lift and drag. Once you pick up speed, you'll start to notice that the velocity vector centers itself on its own. These are the aerodynamics of the ship straightening it out. At speed, the lift engines completely turn off (FWD on the HUD becomes 1.00), and the ship is supported in the air entirely through lift generated by its aerodynamics.

Main Engines vs Lift Engines

The ship has 2 sets of engines. The main engines provide forward thrust, while the lift engines provide upwards thrust (relative to the ship, not the ground) to counter the force of gravity for takeoffs and landings.

In Manual Mode, the ship will automatically distribute the given throttle setting between the lift and main engines. When at a standstill, 100% of thrust is sent to the lift engines. When flying above a certain speed (50 m/s in this demo), 100% of the thrust is sent to the main engines. Between these speeds, it will smoothly blend.

This blending provides some thrust to compensate for the lack of lift when the ship is too slow to generate aerodynamic lift. It can also be used to takeoff vertically in Manual Mode

In the prototype, there isn't a direct way to read out the lift engine throttle, but the FWD line tells you how much thrust is being applied to the main engines.

Taking off in Manual Mode

If you want to do a vertical takeoff that smoothly transitions to forward flight, it can be preferable to take off in Manual Mode. Simply apply max throttle, then tilt the ship slightly forward. As you pick up forward speed and the lift engines cut out, add some nose up to maintain attitude until thrust is fully transitioned to main engine.

Landing in Manual Mode

This is possible, but not recommended. Horizontal landings (i.e. like a normal airplane) are easy to do, but since there isn't an easy way to slow down in Manual Mode, it's difficult to bring the ship to a slow enough speed to make a vertical landing instead of a rolling landing.

It's also worth mentioning that the skids are not designed for horizontal rolling landings, and grab the ground pretty hard. You can still do it, and it's pretty fun watching the ship screech to a halt, but it's not meant to.

Auto Hover Mode (Vertical Flight)

This was the focus of this whole project, and results in really cool looking landings in a completely organic way. I'm really proud of how this turned out.

Vertical Velocity controlled by Throttle

When in the auto-hover mode, the landing jets are automatically fired to maintain a vertical velocity selected by the throttle position.

Put another way, at max throttle, the lift jets will do whatever they can to maintain a +10 m/s vertical velocity relative to the ground. When at minimum, it commands -10 m/s. When centered, the lift jets will do whatever they need in order to maintain a vertical velocity of 0 m/s, a stable hover.

The lift jets are not all-powerful. Depending on what's going on you can end up overpowering them, and at full throttle they won't be able to zero out your vertical velocity. This is most noticeable the ship is moving at speed, and the aerodynamic forces can easily overpower the thrusters.

When descending, the ship also checks for things below it, and the closer it gets, the slower the max commanded descent speed will be. E.g. when only 1 meter above the surface, the max descent rate is reduced to something like 2 m/s.

Auto stabilization and control

When in the Auto Hover Mode, instead of the stick directly controlling pitch and roll, they instead command pitch and roll angles. When the stick is centered, the ship will automatically level itself out to a neutral attitude. This gives roughly an intuitive helicopter-like control scheme.

This is not the same thing as the kind of control schemes most quad copters use, where you are instead commanding a horizontal velocity. This makes for a more dynamic flight, letting you feel the physics better, and adding a bit more "pilotage" to precisely landing somewhere while still being massively easier than doing it all manually.

In the prototype, Yaw is also automatically blended into the roll functionality. This is probably going to be optional, or maybe ship dependent, in the final game. In the prototype though, this makes for more convenient slow speed maneuvers, but it can make "strafing" a bit counter-intuitive.

The Physics

I've only really talked about the control systems up to this point, but I do want to explain how the physics work. This is as it pertains the prototype.

The full game has had to expand this slightly in order to support movement in space and a wider variety of ship designs, but the fundamentals are the same. I'll make notes on where they differ.

Main Engine and Lift Engine

The most simple to explain, and the most obvious. The main engines propel the ship forwards. The Lift engines propel the ship upwards. Both act in the local axis, meaning that if you nose down, the lift engines will have a slight forwards component, which will cause you to pick up forwards speed.

The main engines can also fire backwards at full power to help decelerate the ship. There's no nice animation for this because of how simple the models are, but it makes the ships more controllable. In the prototype, this is triggered when in hover mode and the player commands pitch up. The reverse thrust is only 1/3rd of the strength of the main engine. The transport's main and lift thrusters can both put out the same amount of thrust.

In the full version, the main engines can apply full reverse thrust in space. The lift engines are not used at all in space, though that might change.

Drag (Varies between prototype and full version)

In the prototype, drag is simply an omni-directional value based on the frontal cross section of the ship. The typical (though simplified) drag formula is used to calculate the drag forces.

In the full version, drag is applied to the ship based on 3 different areas that represent the cross section when viewed from each of the cardinal axes. Based on the direction of the ship's velocity, it interpolates between. What this effectively means is that you have the smallest cross section when flying forwards, and the greatest cross section when falling straight downwards.

The drag also has a multiplier for air density that is currently just 1 (planetside) or 0 (space), but I'd like to use values in between to vary the environments you fly in.

Aerodynamics (Wings)

For aerodynamics, I reused the good old SimpleWings components I wrote many years ago. Like Tiny Combat Arcade, and as I've discussed previously in the Vector Flight prototype (that eventually evolved into Tiny Combat's flight model), I use a simple cruciform configuration for the wings. The forces are applied to the center of mass, so these wings do not apply any torque to the ship. They can only straighten out your velocity vector by applying lift.

For more information on how they work, check the GitHub page.

It was critical that the ship could fly in the air like an airplane, and this provides enough of a facsimile of what that feels like for the game's purposes. The aerodynamics also add a very interesting dynamic that separates the way forward flight and hovering flight feels. At low speeds, the aerodynamic forces are negligible, but at higher speeds, the aerodynamic forces can easily overpower any of the engines or thrusters. Mastering that transition between forward and hovering flight, and doing it gracefully, is really satisfying.

Strafe Thrusters (RCS, basically)

To help in precision maneuvering, the ships also have what the game simply calls "strafe thrusters" to help translate the ship in an arbitrary direction. In-atmosphere (as in the prototype) they are very weak, but in space (not in the prototype) they are essential to keeping you flying straight.

There's not too much to say about these things. In the prototype, the only thing they do is apply some lateral thrust when in hover mode and you left/right stick to make it more responsive.

Turn Torques (It's magic!)

The rotations are abstracted away as just simple torques that get applied to the ship. You can pretend they're RCS thrusters or flaps or whatever, but even if the model had such things they would only be visual animations.

The only interesting thing about the rotations is that there is a special video gamey "bank force" that gets applied when the ship is at speed so that if the ship is banked, it will slowly change heading. This is a technique you can read about in more detail here. I think this force is a little too strong in the prototype though, and it's been tuned down in the current in development version.

Updated 1 hour ago
Published 1 day ago
StatusReleased
PlatformsWindows
AuthorWhy485
GenreSimulation
TagsFlight, flight-control, hovering, landing, Physics, Space

Download

Download
ControlledBurn-20250605.zip 36 MB

Comments

Log in with itch.io to leave a comment.

It looks excellent and I would play this game with pleasure, but unfortunately I don't have a gamepad.

That's superb!    I also note that sometimes in movies, the ship will do a slight bank to align with the pad / buildings / crowd below, just before the touchdown.   The Falcon arriving at Bespin just yaws right slightly, that ship in the movie above does a full-on bank to the right just as it's landing...   I wonder if you implement a landing pad, there's a way to have the auto-lander 'bank' to align the nose as it's descending?

If I'm understanding you right, that's something that's just on you to correct as you come down. 

hey why485 I haven’t played the game yet and idk who the hell you are but I just want you to know your games are awesome!! I’ve been following you development on games since all the tiny combat games and I really enjoyed them I hope you continue your career with these games I see the vision and hope that one day you can make a flight sim that is your Magnum opus. Something to rival dcs world while being accessible to people with lower end pc’s with nostalgic graphics. I’m 18 and I’m excited for this project and your next in case you haven’t heard any encouragement. Thanks and Jesus loves you.

Thanks, but I have no interest in making DCS. I still wouldn't, but something more in line with VTOL VR is the most realistic I would ever care to make myself. I would only work on something DCS-like if I was paid lots of money to be on a big team with the resources to make it happen.

Your prototypes have more thought and detail then most actual space games...

Except for Elite Dangerous, I know of and played only 1 physics based game, which had you both flying fighters as well as big boats. What was it called....

Oh and not to forget Evochron, but that was a really long time ago, so I might not remember correctly if it really was physics based.

(2 edits)

Thank you!

Starshatter is one of the tiny handful of games that lets you fly fighters and capital ships. The capitals have a totally different HUD And control scheme. Space Reign also lets you fly both fighters and bigger ships.

awesome