OK... Here's my two minute texty thing
Graphics 640,480
SeedRnd MilliSecs()
txt$ = "SwoopoMatic Text! Who's going to use this in their game!?"
Type ttext
Field x#
Field y#
Field tx
Field ty
Field xs#
Field ys#
Field t$
End Type
For n=1 To Len(txt)
tt.ttext = New ttext
tt\x = Rand(0,640)
tt\y = Rand(0,480)
tt\tx = 320-(Len(txt)*5) + ((n-1)*10)
tt\ty = 240
tt\t = Mid(txt,n,1)
tt\xs = ((tt\x - tt\tx)/200)
tt\ys = ((tt\y - tt\ty)/200)
Next
SetBuffer BackBuffer()
Repeat
Cls
For tt.ttext = Each ttext
If tt\x < tt\tx Then tt\xs = tt\xs + .1
If tt\x > tt\tx Then tt\xs = tt\xs - .1
If tt\y < tt\ty Then tt\ys = tt\ys + .1
If tt\y > tt\ty Then tt\ys = tt\ys - .1
tt\xs = tt\xs * .99
tt\ys = tt\ys * .99
tt\x = tt\x + tt\xs
tt\y = tt\y + tt\ys
If Floor(tt\x) = Floor(tt\tx) Then tt\ys = tt\xs *.5
If Floor(tt\y) = Floor(tt\ty) Then tt\xs = tt\ys *.5
Text tt\x,tt\y,tt\t,True,True
Next
Flip
Until KeyHit(1)
|