08-26-2019, 06:49 PM
(This post was last modified: 08-26-2019, 06:55 PM by ChezDoodles.)
BiArcs are often used for roads and railroads in simulation games. They are very effective, the math is simple, faster and stuff like collision detection, snapping, offseting, distance etc is extremely simple. Railroad Tycoon 3, Sid Meyers Railroads, Railway Empire, Train Fever, Transport Fever and several other train games all use BiArcs (or "Circular Arcs").
Suggested reading for introduction (and interactive examples):
https://www.redblobgames.com/articles/curved-paths/
http://www.ryanjuckett.com/programming/biarc-interpolation/
Some games apparently use 2d math (Railway Empire) while others use 3d math behind their BiArcs.
Since you have such a nice railroad example - you should really include a matching curve type suitable to build larger systems - aka BiArcs aka Circular Arcs
Suggested reading for introduction (and interactive examples):
https://www.redblobgames.com/articles/curved-paths/
http://www.ryanjuckett.com/programming/biarc-interpolation/
Some games apparently use 2d math (Railway Empire) while others use 3d math behind their BiArcs.
Since you have such a nice railroad example - you should really include a matching curve type suitable to build larger systems - aka BiArcs aka Circular Arcs