Try it out!

Instead of designing the track and calculating the forces after, why not design the forces over time and have the computer calculate the track for you?

It turns out to be a fairly interesting math problem which took me about a day of work to solve in 2D. I let it sit for about a year before I figured out a way of repurposing the solution to allow for 3D as well.

High-Level Overview

In a typical rollercoaster designer, (Rollercoaster Tycoon, Planet Coaster, etc.) you normally have control of three quantities when creating a new track segment:

  1. Amount of up or down movement (change of pitch)
  2. Left/right turn radius (change of yaw)
  3. Degree of banking (change of roll)

Every traditional rollercoaster can be described by specifying these three things at every point along the track. If this is the case, what more could you want in a designer?

When designing rollercoasters, you often want the lateral forces felt by the rider to be close to zero. Excessive laterals cause the rider to swing from side to side in the cart and are not particularly fun.

Most rollercoaster games don't have a way of ensuring the laterals are zero. The only way of accomplishing this is by painstaking trial and error, which can be even more difficult if you are trying to create a complex manuever. Professional programs like NoLimits2 have an "Autobank" feature which automatically banks the track in order to zero out the laterals. However, in many coaster elements, such as a corkscrew, the direction the track is banked is integral to the maneuver and is preferably designed if possible. In addition, using such a feature doesn't give us control of the vertical G-Force over time either.

When enthusiasts describe a coaster, they talk about the forces felt by the rider at least as much as the maneuvers the coaster performs. If this is the order of importance, why not design coasters in such a way where forces are first-class citizens?

How it Works

2D coasters

Adapting 2D to 3D

Max Jerk

Of course, G-Force itself is not the only way to make a ride uncomfortable. As we have described it so far, it is possible to jump instantaneously between segments of wildly different G-Forces. Going from high-G to low-G in a short period of time gives the rider the sensation of slamming into their seat, which is uncomfortable. To counteract this, we cap the Jerk (change in acceleration, 3rd time derivative of position), which linearly interpolates the G-Force of the previous segment with the desired G-Force of the current segment in time, at a default rate of 5 G/s. The rate was calibrated using accelerometer measurements from El Toro, whose biggest changes in G force happen with a jerk in the 4-6 G/s range.

Max Snap

Roll Constraints

In the same way we control changes in linear acceleration, we have to do so for rotational acceleration as well.

Limitations

Longer Trains

It is well known that sitting at different point in a train (especially the back or front) can have significant impact on the forces felt during a ride. Therefore, controlling the forces felt by the entire train is much more constraining and cannot be achieved in as simple a way.

A central assumption of this coaster design method is that we know the velocity of a rider at the last vertex in the track.In the single car case, velocity is simply a function of its height. Adding cars behind it, we can still calculate the center of mass of the train to find the velocity of the front car, but this only allows us to build the next vertex with the front car in mind.

In practice, the single car approach can be used to approximately control the forces felt by the middle car of a longer train. Wherever the track curves upward, each car in the multi-car train will move slightly slower than designed, since the center of mass of the train will be higher than that of a 1-car train. Similarly, longer trains will move faster than designed through points that curve down, since its center of mass will be lower than expected.