Just for fun, try running the code before figuring out what it's doing. Just type some letters until you get across the screen. It's pretty neat.
Sync On:Sync Rate 60:Autocam Off:Set Camera Range .001,1000
Make Object Cube 1,.01
Position Object 1,0,0,-.1
lx#=-2:ly#=0:lz#=3
Delay=0
Create Bitmap 1,16,16
Set Current Bitmap 0
Do
s$=Inkey$()
If s$<>"" And Delay<1
n=MakeALetter(s$,lx#,ly#,lz#)
lx#=lx#+.09
Clear Entry Buffer
Delay=15
Endif
Vibrate(n)
Delay=Delay-1:If Delay<0 Then Delay=0
Sync
Loop
Function MakeALetter(txt$,x#,y#,z#)
ob=101
do
if Object Exist(ob)=0 Then Exit
ob=ob+1
Loop
Set Current Bitmap 1
Ink 0,0
Box 0,0,15,15
Ink Rgb(255,255,255),0
Set Text Size 8
Center Text 7,0,txt$
For j#=0.0 to 15.0
For i# = 0.0 to 15.0
n=Point(i#,j#)
If n<>0
If Object Exist(ob) Then Delete Object ob
Clone Object ob,1
Position Object ob,x#+i#*.01,y#-j#*.01,z#
ob=ob+1
Endif
Next i
Next j
If Object Exist(ob) Then Delete Object ob
If ob>600 and Object Exist(101) Then Delete Object 101
Set Current Bitmap 0
EndFunction ob
Function Vibrate(u)
For i = 101 to 600
Flag=0
If u-i>200 then Flag=1
If u<i And i<301+u Then Flag=1
If Flag=1
If Object Exist(i)
Move Object Up i,rnd(10.0)/1000.0-rnd(10.0)/1000.0
Move Object Left i,rnd(10.0)/1000.0-rnd(10.0)/1000.0
Move Object i,rnd(5.0)/1000.0-rnd(10.0)/1000.0
Endif
Endif
Next i
Endfunction
"Droids don't rip your arms off when they lose." -H. Solo
REALITY II