Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Not So Impossible Challenge: Screen Saver Contest!
#16
My entry: Electricity

[syntax="QBASIC"]
declare sub setpal(c%, r%, g%, b%)
randomize timer
screen 13
for i% = 0 to 31
setpal(i%, 0, 0, i% * 2)
next i%
do
x% = abs(x% + int(rnd * 2) + (-1 * int(rnd * 2))) mod 319
y% = abs(y% + int(rnd * 2) + (-1 * int(rnd * 2))) mod 199
pset(x%, y%), int(rnd * 30) + 1
pset((159 + (x% + int(rnd * 2) + (-1 * int(rnd * 2)))) mod 319, (99 + (y% + int(rnd * 2) + (-1 * int(rnd * 2)))) mod 199), int(rnd * 30) + 1
pset((319 - (x% + int(rnd * 2) + (-1 * int(rnd * 2)))) mod 319, (199 - (y% + int(rnd * 2) + (-1 * int(rnd * 2)))) mod 199), int(rnd * 30) + 1
wait &H3DA, 8
if int(bg!) > 0 then
bg! = bg! - 0.5
setpal(0, 0, 0, int(bg!))
end if
if int(rnd * 500) = 1 then bg! = 25
loop while inkey$ = ""
sub setpal(c%, r%, g%, b%)
out &H3C8, c%
out &H3C9, r%
out &H3C9, g%
out &H3C9, b%
end sub
[/syntax]

-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply


Messages In This Thread
Just - by Mango - 02-27-2005, 08:19 PM
The Not So Impossible Challenge: Screen Saver Contest! - by shiftLynx - 03-01-2005, 01:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)