The terrain was probably done with an array of the y position of the terrain at every X, or maybe just a polyline. It's fast because only the points near the bike need to be checked. That is an optimization that works in that particular case. C2 is more general purpose, but the same idea could be used with manual collision detection and response.
The recommended C2 way is to make the terrain up of multiple objects that make up the curve. Tilemaps could be used but they may not give smooth enough curves depending on what you want.
More ideas here: