taking the drawimagerect approach a bit furthur.. i have written the below so it loads in an animimage.
sine height must be a factor of the image height.
i have used the first image as sine.png (64*128)
sine height must be a factor of the image height.
i have used the first image as sine.png (64*128)
sine_height = 2 sine_speed = 8 sine_depth = 5 Graphics 800,600 sine_img:timage = LoadAnimImage("sine.png",64,sine_height,0,128/sine_height) ' sine angle angle:Int = 0 While Not KeyDown(key_escape) ' new sine angle=(angle+sine_speed) Mod 360 ' draw background with sine y:Int = 0 While y < GraphicsHeight() offset = Sin(angle+y)*sine_depth x:Int = offset While x < GraphicsWidth() DrawImage sine_img,x,y,(y/sine_height) Mod (128/sine_height) x:+64 Wend y:+sine_height Wend Flip Wend