I've decided to make a game that features trains, which means it would be really handy to be able to create a behavior that ties objects to a track and allows the movement of an object to be characterised entirely by its speed and how far along a given track it is. The basic idea is to define rails as some parametric curve (say, a spline), and then store only a train's speed and distance along this curve and at every frame decode the parametric position into the Cartesian position that the sprite gets drawn at. Once that's done it's fairly easy to add fancy behavior like acceleration, slowing down for corners and slopes and whatever.
My question is is it worth writing an entire behavior for this, or is simply calling a Python script that does the calculations every frame the way forward? As I understand it there's no way of implementing this kind of movement without some kind of script.
Pretty much anything that can be done with a script can be done with events. This can be done with events.
Develop games in your browser. Powerful, performant & highly capable.
There's lerp, cubic, etc, or an existing behavior.
Or what you can do easily (If you are looking from a top view) is give it bullet movement, and put an invisible block at corners.
Train>On collision with>Turn_right_square:Train=Turn 90*