Hit the flag. That's it. This is a Random Terrain Builder. I made this using Jumpy Sine Waves, so it should always curve up and down.
All by me, @Nt45. Feel free to use with credit! I would love to see someone make this into a platformer!