Definitely not my cleaniest code, but it works. Slowly displays one character at a time and gradually fades each character. I initially saw this in a game (WoW perhaps) and thought it was neat.
Edit:
Updated the code a little bit, just change the line to point to your own text file.
TYPE TEXT_LINE
display as string
timestamp as integer
ENDTYPE
TYPE FADER
x as integer
y as integer
typeDelay as integer
fadeDelay as integer
currentLine as integer
currentLineLength as integer
lineCount as integer
toCharIndex as integer
timestamp as integer
ENDTYPE
dim fadeLines(0) as TEXT_LINE
dim fadeProps(1) as FADER
open to read 1, "c:\500.php"
lineCount = 0
while file end(1) = 0
read string 1, z$
inc lineCount
array insert at bottom fadeLines()
fadeLines(lineCount).display = z$
endwhile
close file 1
fadeProps(1).x = 100
fadeProps(1).y = 100
fadeProps(1).typeDelay = 40
fadeProps(1).fadeDelay = 40
fadeProps(1).lineCount = array count(fadeLines())
fadeProps(1).currentLine = 1
fadeProps(1).currentLineLength = len(fadeLines(fadeProps(1).currentLine).display)
fadeLines(fadeProps(1).currentLine).timestamp = timer()
make matrix 1,1000,1000,100,100
make object cube 1, 20
sync on
sync rate 0
sync rate 60
boxAlpha = 160
DO
`cls
box fadeProps(1).x-10, fadeProps(1).y-10, fadeProps(1).x+470, fadeProps(1).y+250, argb(boxAlpha,255,0,0),argb(boxAlpha,0,255,0),argb(boxAlpha,0,0,255),argb(boxAlpha,255,0,255)
rem controls the teletype effect
if fadeProps(1).timestamp+fadeProps(1).typeDelay <= timer()
fadeProps(1).timestamp = timer()
fadeProps(1).toCharIndex = fadeProps(1).toCharIndex + 1
currentLength = len(fadeLines(fadeProps(1).currentLine).display)
if fadeProps(1).toCharIndex > fadeProps(1).currentLineLength then fadeProps(1).toCharIndex = fadeProps(1).currentLineLength
endif
rem make sure we don't go past the total amount of lines
if fadeProps(1).currentLine > fadeProps(1).lineCount then fadeProps(1).currentLine = fadeProps(1).lineCount
rem loop through all lines of text
for i = 1 to fadeProps(1).currentLine
spacing = 0
if i <> fadeProps(1).currentLine
L = len(fadeLines(i).display)
else
L = fadeProps(1).toCharIndex
endif
rem loop through each displayed character for this line of text
for j = 1 to L
rem determine position for this character
if j > 1 then spacing = spacing + text width(mid$(fadeLines(i).display, j-1))
rem calculate the fade step for this character and set its alpha value
v = ((timer() - fadeLines(i).timestamp) / fadeProps(1).fadeDelay) - (j-1)
if v > 32 then v = 32
if v < 1 then v = 1
alpha = v*8 - 1
ink argb(alpha,255,255,255),0
text fadeProps(1).x+spacing, fadeProps(1).y+(i-1)*text height("A"), mid$(fadeLines(i).display, j)
next j
rem if
if fadeProps(1).toCharIndex = fadeProps(1).currentLineLength and fadeProps(1).currentLine < fadeProps(1).lineCount
fadeProps(1).currentLine = fadeProps(1).currentLine + 1
fadeProps(1).toCharIndex = 0
fadeLines(fadeProps(1).currentLine).timestamp = timer()
fadeProps(1).currentLineLength = len(fadeLines(fadeProps(1).currentLine).display)
endif
next i
xa# = wrapvalue(xa#+1)
za# = wrapvalue(za#+2)
xrotate object 1, xa#
zrotate object 1, za#
sync
LOOP
function argb(a,r,g,b)
c = (a*16777216)+(r*65536)+(g*256)+b
endfunction c