I don't know how many times this has been done before, but I needed to make this for my project anyway, so I figured I'd post it here in case anyone needs to do this.
It's all done using 3D textured ghosted plains, so you can throw a backdrop behind it if you like. They are all on a z-plane of depth 25, locked to the screen, so you can move the camera around if you wish. I don't even know if anyone is interested, but I figured it wouldn't hurt to post it.
`Matrix-like Effect
`======================
`©Xander Moser April 2006
`======================
set display mode 1024,768,32:set window off:autocam off
sync rate 0:sync on:randomize timer():color backdrop rgb(0,0,0)
global numobject:global numimage:numobject=0:numimage=0:global speed#:speed#=1.0
set image colorkey 0,0,0:create bitmap 1,32,32:set text size 24:dim numberimage(10)
for a=1 to 10
center text 16,10,str$(a-1):numberimage(a)=numimage():get image numberimage(a),0,0,31,31,1:cls
next a
delete bitmap 1:set text size 12
type triggerinfo x# as float y# as float stop as integer endtype
numtrigger=12:dim trigger(numtrigger) as triggerinfo:dim numfade#(80,60):dim numtex(80,60)
for a=1 to numtrigger:trigger(a).x#=((rnd(79)+1)/2)-20.0:trigger(a).y#=15.0+rnd(30):trigger(a).stop=0-rnd(20):next a
for x=1 to 80:for y=1 to 60:numtex(x,y)=1+rnd(9):next y:next x
numnum=250:dim num(numnum)
for n=1 to numnum:num(n)=numobject():make object plain num(n),1,1:lock object on num(n):ghost object on num(n):texture object num(n),numberimage(1+rnd(9)):hide object num(n):next n
`------------------ main loop
repeat
for a=1 to numtrigger
trigger(a).y#=trigger(a).y#-0.06*speed#:x=(trigger(a).x#+20.0)*2
for y=1 to 60
if abs(trigger(a).y#-((y/2.0)-15.0))<1.0 then numfade#(x,y)=accelerate(10.0,numfade#(x,y),200.0)
next y
if trigger(a).y#<trigger(a).stop then trigger(a).x#=((rnd(79)+1)/2.0)-20.0:trigger(a).y#=rnd(20):trigger(a).stop=0-rnd(20)
next a
for a=1 to numnum:hide object num(a):next a
for x=1 to 80
for y=1 to 60
if numfade#(x,y)>0.0
numfade#(x,y)=accelerate(3.0,numfade#(x,y),0.0)
if rnd(20/speed#)=0 then numtex(x,y)=1+rnd(9)
gosub findnum
if fnum>0 then show object num(a):texture object num(a),numberimage(numtex(x,y)):position object num(a),(x/2.0)-20.0,(y/2.0)-15.0,25.0:fade object num(a),numfade#(x,y)
endif
next y
next x
fps#=screen fps():speed#=60.0/fps#:text 10,10,"FPS:"+str$(fps#)
sync
until mouseclick()=1
`--------------------- end main loop
for a=1 to numobject
if object exist(a)=1 then delete object a
next a
for a=1 to numimage
if image exist(a)=1 then delete image a
next a
end
findnum:
fnum=0:a=0
repeat
inc a
if object visible(num(a))=0 then fnum=a
until a=numnum or fnum>0
return
function numimage()
inc numimage
endfunction numimage
function numobject()
inc numobject
endfunction numobject
function accelerate(accel#,vel#,limit#)
if limit#>vel# then accel#=abs(accel#) else accel#=0.0-abs(accel#)
vel#=vel#+(accel#*speed#)
if sign(accel#)>0
if vel#>limit# then vel#=limit#
else
if vel#<limit# then vel#=limit#
endif
endfunction vel#
function sign(value#)
if value#<0.0 then exitfunction -1.0
if value#>0.0 then exitfunction 1.0
endfunction 0.0
Xander Moser - Bolt Software - Firewall