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.