11
\$\begingroup\$

In a 3D flight simulator with a Crimson Skies level of realism (as in, arcade level rather than realistic), how do you determine the movement of an aircraft each game clock tick?

(Crimson Skies is an arcade-like flight simulator: http://youtu.be/OWmYt0LZDnU?t=3m )

I presume the game advances in fixed steps, and each step each moving object moves in a straight line with constant velocity from its current position to the next.

What basic parameters would you need to determine the mass, speed, throttle .etc. Also how would you combine them?

\$\endgroup\$
8
  • \$\begingroup\$ Interesting question, but isn't it too broad? I mean, it kind of asks for the gritty details of aircraft simulation dynamics. Apart from numerical integration of torques and accelerations, is there anything particular that an answer should address? I personally would prefer avoiding torques and accelerations for altering the trajectory since they're harder to work with and offer an experience a casual gamer does not like (game mechanics using inertial effects is hard to tweak). \$\endgroup\$
    – teodron
    Aug 20, 2013 at 12:34
  • \$\begingroup\$ You should define what "Crimson Skies-level realism" actually means, because there are people (like me) who haven't played that game and are now excluded from providing an answer. \$\endgroup\$
    – Philipp
    Aug 20, 2013 at 12:51
  • 3
    \$\begingroup\$ Isn't this essentially "How to implement physics?"? \$\endgroup\$
    – House
    Aug 20, 2013 at 13:03
  • 1
    \$\begingroup\$ From my answer here, this is the same advice I'd give for this question: Iterative empirical testing. Add some test sliders to your GUI that control the various parameters you're interested in testing. \$\endgroup\$
    – House
    Aug 20, 2013 at 13:11
  • 3
    \$\begingroup\$ "Physics" + "Simulator" + "Simple" Pick any two. The reason you can't find any easy flight simulator examples is because cartoon flight is cheated and devolves into a simple character controller while even minimal simulations dig deep into physics and are notoriously difficult to keep stable. \$\endgroup\$ Aug 20, 2013 at 20:41

1 Answer 1

24
\$\begingroup\$

To understand how to simulate aerodynamic flight, one first has to understand which forces affect the movement of an aircraft. The actual trajectory of an aircraft is the sum of all of these physical effects:

Newton's first and second law of motion

  1. An object moves at a constant velocity, unless acted upon by a force.
  2. The acceleration of a body is directly proportional to, and in the same direction as, the net force acting on the body, and inversely proportional to its mass. Thus, F = ma, where F is the net force acting on the object, m is the mass of the object and a is the acceleration of the object.

Engine Thrust

The thrust of the engine is a force which accelerates an aircraft forward and usually can be controlled by the player. The acceleration is the power of the engine divided by the mass of the aircraft.

Gravity

Gravity constantly accerates an aircraft downwards with a speed of 9,81 m/s². In theory, gravity becomes less when you go higher, but at the height where normal aircrafts operate, this can be ignored.

Aerodynamic drag

The faster an aircraft moves, the more does atmospheric friction slow it down. This is represented by a force accelerating in a direction against the current direction the craft is moving. The force increases quadratical with the speed (double speed = four times the drag force). But the higher the aircraft is flying, the thinner the atmosphere and the lower the drag-force. The maximum speed of an aircraft is where the forces generated by engine thrust and aerodynamic drag cancel each other out.

It might sound counter-intuitive, but having a stronger drag-constant will actually make your game easier to play (more arcade-like), because drag is the force which stops the plane from flying into the direction the player doesn't want to fly anymore (like when flying a curve). So more drag = slower and more maneuverable planes. You can further improve this by increasing the drag when there is a difference between the heading-direction and the movement-direction of the plane (this isn't even unrealistic - the aerodynamic profile of a plane is optimized for least air resistance when the plane is flying straight).

Aerodynamic lift

This is the force which actually causes a plane to fly. It is generated by the wings. The larger the wing surface, the more lift is generated, and accelerates the plane upwards (relative to the wings, not the ground. When the plane rolls sideways, the lift is accelerating it sideways, too). Just like the atmospheric drag, the lift is relative to speed and atmospheric density.

Control surfaces

A plane controls its direction with different control surfaces for pitch, yaw and roll. A control surface only works when the plane is moving. Its efficiency is proportional to the current speed and atmospheric density. Note that control surfaces only change the direction in which the plane is pointing, not the direction it is moving. This affects the direction of thrust and lift, and thus gradually the movement direction.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Small one: power (energy rate) increases with the cube of speed. Drag force is proportional to speed squared, and power would be the product of drag and speed. But you don't discuss anything else in terms of energy rates, so you probably meant to refer to drag force anyway. \$\endgroup\$ Aug 20, 2013 at 14:03
  • \$\begingroup\$ "Its efficiency is proportional to the current speed and atmospheric density." Slightly inaccurate, a plane gets more air drag when it change directions, because it forces the air flow into another direction, so you have to balance this with inertia, which is something I was wondering about recently: how do you calculate the force that results the plane from changing direction, you can simplify fluid mechanics to answer this, but I don't know the good answer. You also have to consider the size of the wings. \$\endgroup\$
    – jokoon
    Aug 20, 2013 at 15:51
  • 2
    \$\begingroup\$ @jokoon you are right about that, but please consider that the question is about a simple, arcade-like flight simulator. Maximum realism is neither required nor desired. For maximum realism I would unify drag, lift and rudder torque in an accurate simulation of the aerodynamics around the 3d model of the plane, but for most games which don't try to compete with Microsoft Flight in terms of realism, that would be overkill. \$\endgroup\$
    – Philipp
    Aug 20, 2013 at 17:50
  • \$\begingroup\$ I once went to an air show, when you see a fighter jet make a turn, you watch and feel the weight of the plane pushing the air below it, like it's drifting, but flying at the same time. I still wonder if the lift you were talking about would still appear without the details I talked about. I guess yes, am I right ? It would only change the lift vector, making the plane somehow drift. \$\endgroup\$
    – jokoon
    Aug 20, 2013 at 21:13
  • 1
    \$\begingroup\$ @OndrejPetrzilka You know how planes bank when they turn? That causes the lift vector to point towards the middle of the turn. \$\endgroup\$
    – user253751
    Jan 10, 2018 at 5:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .