This week I continued improving coasters. The code for moving coaster cars along the track is the first thing I wrote for this game - in the meantime I had some ideas for improving it that I wanted to test. I wanted to make sure that these improvements don’t decrease the performance so I used this coaster train with 150 cars for taking performance measurements (it requires approximately the same amount of CPU as many shorter trains, but is easier to measure):

In the end, the new code wasn’t only cleaner and more precise but also significantly faster, so that’s pretty good :)

In a previous update I mentioned that the track crossbeams weren’t absolutely evenly spaced, which as a side effect of these improvements could be fixed and now it’s perfect:

Our hills also had a bit of an odd shape that I fixed - I’m not entirely sure if it’s perfect yet, but it’s certainly much better:
