rem rain - a simple raindrop effect
rem iPhone 6 Plus / 8.3 b4
rem Enjoy...
graphics
sw=screen_width()
sh=screen_height()
md=10 ' number of rain drops
dropsize = 40 ' max size of rain drops
dim dropx(md+1)
dim dropy(md+1)
dim dropr(md+1)
for a=1 to md
dropx(a)=rnd(sw)
dropy(a)=rnd(sh)
dropr(a)=rnd(dropsize)
next a
loop:
refresh off
graphics clear 0,0,50/255
for a=1 to md
bri=250-dropr(a)*5
draw color 0,0,bri/255
draw circle dropx(a),dropy(a) size dropr(a)
dropr(a)=dropr(a)+1
if dropr(a)>dropsize then
dropx(a)=rnd(sw)
dropy(a)=rnd(sh)
dropr(a)=0
end if
next a
refresh on
goto loop
Attachments
image.jpg (153.97 KiB) Viewed 1503 times
image.jpg (77.79 KiB) Viewed 1503 times
image.jpg (77.84 KiB) Viewed 1503 times
image.jpg (76.67 KiB) Viewed 1503 times
Last edited by DrChip on Fri Sep 04, 2015 2:31 am, edited 1 time in total.