Author Topic: Old Mirage  (Read 1971 times)

Peter

  • Guest
Old Mirage
« on: November 22, 2012, 05:16:57 PM »
Hi,

Fata Morgana.
Code: [Select]
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()
« Last Edit: January 27, 2013, 10:17:08 PM by Peter »

Peter

  • Guest
Re: Old Mirage
« Reply #1 on: November 22, 2012, 05:34:46 PM »
more kids fun.
Code: [Select]
screen(640,480,0,"NewWobble")
setframetimer (60)


repeat
key=getkey()
putimage(Rand(20,-20),Rand(20,-20),bild)
sync()
until key == 27
closewindow()
« Last Edit: January 27, 2013, 10:18:11 PM by Peter »

Peter

  • Guest
Re: Old Mirage
« Reply #2 on: November 22, 2012, 06:22:08 PM »
another banana mirage.
Code: [Select]
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()
« Last Edit: January 27, 2013, 10:19:07 PM by Peter »