Bumpy Surfaces?

hey, i am trying to create a scrolling background with bumpy surfaces in which the character moves along with the arrow keys. similar to the bmx/motorbike/monster truck games e.g. http://www.teagames.com/games/tgmotocross/play.php.

However i am not too sure where to start :(, i have been thinking about generating the surface using code i.e. drawing a line generated from code. another method in which i can use (i think, correct me if im wrong) is that i can use a huge bitmap image and use collision detection?

is there any other ways that are better or more efficient to try to replicate this type of bumpy surface?

thank you