Post by Daniel on Jun 21, 2005 19:51:53 GMT -5
This took me all of an hour, but I thought that it was pretty neat. If anyone wants to add something, feel free too. I'm posting the Basic4gl code so it's pretty much open source. Just don't claim it as your own.
Any help with making it fade in or out or better characters to use would be nice
You can use this to convert it into a scr. file
Any feedback would be appreciated!
Daniel
Any help with making it fade in or out or better characters to use would be nice
dim x , count, count2, cycle, cycle2, green, sleepnum
x = 40
dim current$(x)
dim number$(2), a, letteronscreen(x), letterx(x), lettery(x)
sleepnum=75
number$(1)=1
number$(2)=0
textmode(TEXT_BUFFERED)
resizetext(65 ,30)
While True
locate 1,1
count = 0
count2 = rnd() % 3 +1
for x = 1 to 40
if count = count2 then goto step1
endif
if letteronscreen(x) = false then
if rnd() % 5 = 1 then
gosub newletter
letteronscreen(x)=true
count = count +1
endif
endif
next
step1:
for x = 1 to 40
if letteronscreen(x) = true then
color (0,200,0)
locate letterx(x), lettery(x)
print current$(x)
color (0,170,0)
locate letterx(x), lettery(x)-1
print current$(x)
color (0,140,0)
locate letterx(x), lettery(x)-2
print current$(x)
color (0,110,0)
locate letterx(x), lettery(x)-3
print current$(x)
color (0,80,0)
locate letterx(x), lettery(x)-4
print current$(x)
color (0,50,0)
locate letterx(x), lettery(x)-5
print current$(x)
color (0,20,0)
locate letterx(x), lettery(x)-6
print current$(x)
endif
next
DrawText ()
cls
for x = 1 to 40
if letteronscreen(x) then lettery(x) = lettery(x) + 1
endif
if lettery(x) = 33 then letteronscreen(x) = false
endif
next
sleep(sleepnum)
if InScanKey () then end
endif
wend
newletter:
current$ (x) = number$(rnd() % 2+1)
letterx (x) = rnd()%65
lettery (x) = rnd()%4+1
letteronscreen(x) = true
return
You can use this to convert it into a scr. file
dim File1, File2
File1 = OpenFileRead ("Files\MatrixScreensaver.exe")
File2 = OpenFileWrite ("Files\MatrixScreensaver.SCR")
While not EndOfFile (File1)
WriteByte (File2, (ReadByte (File1)))
Wend
CloseFile (File1)
CloseFile (File2)
print "done"
Any feedback would be appreciated!
Daniel