Retrogamecoding(.org) > Examples

Old Mirage

(1/1)

Peter:
Hi,

Fata Morgana.

--- Code: ---screen(640,480,0,"Mirage Effect")
setframetimer(24)
backcolor(75,100,200)

repeat
key=getkey()
cls()
x = x - .5
m = x
for cx=0, imageheight(kn)-1 do
   m = m + wFreq
   for dx=0, imagewidth(kn)-1 do
      color(r,g,b)
      if RGB(r,g,b) > 0 then
         fillcircle(150+dx*2+sin(m)*wAmp+1,100+cx*2,2)
      end
   end
end
color(255,255,255)
until key == 27
CloseWindow()

--- End code ---

Peter:
more kids fun.

--- Code: ---screen(640,480,0,"NewWobble")
setframetimer (60)


repeat
key=getkey()
putimage(Rand(20,-20),Rand(20,-20),bild)
sync()
until key == 27
closewindow()

--- End code ---

Peter:
another banana mirage.

--- Code: ---screen(800,600,0,"Mirage Effect")
setframetimer(80)
backcolor(80,80,250)
colourkey (0,0,0)

repeat
key=getkey()
cls()
alphachannel (128)
x = x - .5
m = x
   for dx=0, imagewidth(kn)-1 do
      r= imagered  (dx,cx,kn)
      g= imagegreen(dx,cx,kn)
      b= imageblue (dx,cx,kn)
      color(r,g,b)
      if RGB(r,g,b) > 0 then
         dot(250+dx+sin(m)*wAmp+1,200+cx)
      end
   end
end
alphachannel (255)
putimage (250,55,km)
sync()
until key== 27
Closewindow()

--- End code ---

Navigation

[0] Message Index

Go to full version