I think you mean, Set Cursor 150,280 and not Text 150,280.
I often use Draw Sprites First to force all 2D (and 3D) to be drawn on top of the sprites.
However, I've found the Tunnel Effect is not a good example for displaying text in this way, it doesn't work to well because any old text displayed cannot be cleared with a simple Cls, that would spoil the tunnel. I found the best way in this case would be to allow the sprites themselves erase the old text. But...
Set Display mode 640,480,16: sync on : sync rate 40 : randomize timer()
rem --- draw sprite
for i = 1 to 2000
c = rnd(255) : a# = rnd(3600)/10.0
x = newxvalue(160,a#,c/1.5) : y = newzvalue(120,a#,c/1.5)
r = c + rnd(128)-80 : if r < 0 then r = 0
g = c + rnd(128)-80 : if g < 0 then g = 0
b = c + rnd(128)-80 : if b < 0 then b = 0
ink rgb(r,g,b),0 : box x,y,x+1,y+1
next i
rem --- grab image and set sprites
get image 1,0,0,319,239,1 : cls 0
sprite 1,320,240,1 : set sprite 1,0,1 : offset sprite 1,162,118 : scale sprite 1,290
clone sprite 1,2 : offset sprite 2,158,122
rem --- allow 2D and 3D to be drawn on top of sprites
draw sprites first
rem --- setup text
ink rgb(255,255,255),0
set text size 32
textdelay = 4000
gosub GetNextLine
ti=timer()
do
rem --- update sprites
rotate sprite 1,ang#
rotate sprite 2,-ang#
ang# = wrapvalue(ang# + 0.5)
rem --- update text if there are any lines left to display
if linecount <> -1
rem --- change text when paused for long enough
if (timer()-ti) >= textdelay
gosub GetNextLine
ti = timer()
endif
rem --- show text
center text 320,220,t$
endif
sync
loop
GetNextLine:
inc linecount, 1
restore textdata:
for i = 1 to linecount
read t$
if t$="<end>"
t$ = ""
linecount = -1
return
endif
next i
return
textdata:
data "An example of using..."
data "Draw Sprites First to allow..."
data "all 2D and 3D to be drawn..."
data "on top of your sprites."
data "<end>"
...but as you may see, it's a little untidy. I have yet to find an effective solution.
I could have used a sprite for the text and turn that sprite's backsave on, but I've discoverd DBPro's sprite backsave is apparently bugged (I think Lee knows about this), attempt to backsave one sprite will affect all sprites, which is a little annoying, as this will also spoil the tunnel effect.
Now that I've posted this, someone is going to prove me wrong
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.