I'm trying to make a terrain like the one on those games, I mean a terrain that is a wave that keeps changing and where the object keeps oscilating.
I've never done anything like this before and for now I got a reasonable success... I managed to draw a wave like that by varying the amplitude of the wave every point... more o less this is the resoult:

To make the object follow the wave is easy, its just getting the amplitude of the y of the function that draws my wave and drawing it there...
My problem comes when I try to apply physics, although I thought I managed to do it I realized I don't... when the physics are calculated within miliseconds the object moves little by little, but when applied for a second or so it moves more than 1000px
So... I wondered if someone can help me appliying the physics to this wave...
Edgar






