Hey guys,
as part of my Ludum Dare game
Frostbite (will probably post it on here somewhere as soon as the post compo version with all the bug fixes and improvements is done) I also created a rollercoaster. For the end credits of the game, sort of. Doesn't really make much sense as the game has nothing to do with rollercoasters, but I really wanted to take the chance...

Especially given that this is probably my first and last 3D project in a long while.
I haven't seen anything like this made with DBP before (well, maybe I just missed it), so I thought I'd share it.
As it wasn't really an essential part of the game it's certainly far from perfect - no support structures, no train (the camera simply moves along the track), no scenery (just this voxel environment that makes your eyes hurt), the ride itself doesn't really flow all that well (those splines are hard to control man!), the texturing is rather suboptimal, the coaster doesn't make any sound.. but still, it's kind of cool. And considering I just spent about a few hours on it from the first thought of "hey how about a roller coaster?!" until it was readily implemented in the game (also given I have basically zero experience with 3D stuff), it turned out way better than I expected.
Few notes on the technical background:
* Coaster was built in a small, self written editor by placing nodes - each node has a position and orientation and the're usually like 10-20 meters apart
* For every node, 32 "steps" are precomputed (every fourth or so is used to create these horizontal bars supporting the rails) using a spline going through the nodes
* Movement between two adjacent steps is interpolated in a linear way
* When the coaster is built, a simple algorithm maps spacial progress to the coaster's "progress parameter" (indicating where on the track the coaster is in the
node domain.. i.e. a value between 1.0 and 2.0 means it's somewhere between node 1 and 2).. this is required to make sure the coaster's speed affects the
actually travelled distance and not that arbitrary progress parameter (otherwise it would move much faster the further two nodes are away, which isn't realistic and significantly impairs the experience)
* When riding the coaster, it's accelerated by gravity by multiplying some constant factor with sin(ax#), where ax# is the x angle of the coaster at that point, additionally a bit of friction slows the coaster down over time
* As I wasn't satisfied with the output, I ran a simple blur function over all the coaster's steps several times, this made the whole ride (at least the camera behaviour - the visual appearance of the coaster itself didn't change) much smoother and more enjoyable
*I actually wanted to have a proper inversion in the track, but as soon as I made it more vertical than the one there is now, I ran into angle problems. The camera would always make a very quick 180° turn and end up on the wrong side of the track. Couldn't figure out how to solve that yet, hence the track is rather flat and simplistic.
I might be going to improve this a bit in the future, or use the code to create a proper coaster in a more natural environment, i.e. on a terrain, with trees and water and skybox and stuff - just for the sake of it. But that would take time, and I don't have a lot of that.
If you want to try the coaster yourself (although that doesn't make much of a difference since you can't move the camera during the ride), feel free to download the game. Might take 15ish minutes to get to the end, but I like to think the rest of the game is also worth the time.