Is there anyway, i can bring up the timer text on the scrolling screen so i can do tests for a rythym game?
sync rate 0
sync on
hide mouse
draw to front
starttime=timer()
do
cls
time#=timer()-starttime
timeinseconds#=time#/1000.0
if spacekey()=1 and spacekeydown=0
spacekeydown=1
difference#=(timeinseconds#)-2.0*roundtointeger(timeinseconds#/2.0)
endif
if spacekey()=0 then spacekeydown=0
text 0,0,"Time: "+left$(str$(timeinseconds#),5)
text 0,20,"Difference: "+left$(str$(difference#),5)+"s"
loop
function roundtointeger(value#)
integervalue=int(value#+0.5)
endfunction integervalue
load bitmap "C:Program FilesThe Game CreatorsDark Basicmediabitmapsphotosbuildingfort01.bmp",1
create bitmap 2,640,480
set current bitmap 1
for i=1 to 480
get image i,0,i-1,640,i
next i
set text opaque
ink rgb(255,255,255),0
dim y(480)
for a=1 to 480
y(a)=a
next a
do
gosub 2_vScroller
sync
loop
2_vScroller:
set current bitmap 2
for i=1 to 480
paste image y(i),0,i
oldy=y(i)
inc oldy
if oldy>480 then oldy=1
y(i)=oldy
next i
text 0,0,str$(screen fps())
set current bitmap 0
copy bitmap 2,0
Return