This is a challenge that I did for someone I know. Press space to generate a screen's worth of terrain. Adjust the max range variable to change how much the height can change between every point. Adjust the number of points to change how many different points with different altitudes are generated. Finally, you can press P to type in a preset. The only ones that I have currently are: *flat: It is pretty flat. *hills: Hilly, but not too crazy. *minimountains: crazy mountains, but they are all tiny. You can type in anything on the list above, and it will automatically set the variables to make this kind of terrain. Just make sure that you type them exactly and all in lowercase.
This was someone I know's idea, but I thought of how to execute it, and wrote all of the code. If you use any of my code, I prefer that you give me credit. Thanks! Change Log: v0.1: Original v1.0: Extremely Buggy and Laggy. Added Smoothing<--