How can I create moving water (2D) in BlitzMax?

BlitzMax Forums/BlitzMax Programming/How can I create moving water (2D) in BlitzMax?

SofaKng(Posted 2007) [#1]
How can I create moving water (2D) in BlitzMax?

I'm thinking of simple waves that move from left-to-right (or right-to-left). More specifically, remember the water at the bottom of a Worms level? That's what I'm trying to recreate :)

I'm found some code in the archives but they are only for BlitzPlus AND they really aren't exactly what I'm looking for (although they aren't that bad...)


Robert Cummings(Posted 2007) [#2]
Make an image of a /\ triangle, move it from left to right while scaling it up and down on the Y axis. Also need to reposition it as you do so, the effect is nice and the code simple.

Repeat for as many waves as you need


Perturbatio(Posted 2007) [#3]
or you could just have tiled animated sprites.


fredborg(Posted 2007) [#4]
Like this?



LarsG(Posted 2007) [#5]
elegant, fredborg! :)


Why0Why(Posted 2007) [#6]
Fredborg, I agree with Lars. Elegant and simple!


ImaginaryHuman(Posted 2007) [#7]
I think worms just had an animated sprite, or set of them in parallax, pasted down there.