Basic 2D Wavey Sea?
Blitz3D Forums/Blitz3D Beginners Area/Basic 2D Wavey Sea?
| ||
I seem forgot how to do them...using Cos or sin for rect commands to make 2D Wavey Sea. could anyone tell me how to do it please? |
| ||
you mean a wavey sea like side on or bird's eye view? you could always use an animation for it rather than program it. I've never needed to make water so i dont know. |
| ||
ups, i read 3d waves, sorry |
| ||
Side on - you all seen the Worm game that show wavey sea and I would like to know how do that |
| ||
Worms is done using several animated images. Using rects is ugly and slow as you can see from this quick example ... Graphics 640,480,32,1 Global WATERloop = 0 Global WATERheight = 10 Const WATERstep = 2 While Not KeyDown(1) SetBuffer BackBuffer() Cls Color 50,50,250 For x = 0 To 639-WATERstep Step WATERstep y = 240 + WATERheight * Sin( WATERloop ) * Sin( 5.0 * x ) Rect x, y, WATERstep, 400,1 Next WATERloop = ( WATERloop + 10 ) Mod 360 Flip Wend |
| ||
thank you very much Stevie G :) |
| ||
found in the archives. http://www.blitzbasic.com/codearcs/codearcs.php?code=292 |