I have been making a game in class and have gotten pretty far. I have done the whole thing without using a sync rate and now I need to print something and have the variable decrease on the screen. I believe I have the right code for it to do so, but I think I need to add a sync rate. I have tried to add one and It makes to the game extremely laggy when the sync rate is at 60. Also, it will not show the text at the beginning of the game. How do I dcrease the variable on screen. (Variable is located towards the bottom of the code) Thanks

REM edutainment
REM by abbas and sam
REM created 12/2/13 10:11 a.m.
autocam off
hide mouse
rem ****____****____title intro thing____****____****
center text 320,240, "Welcome to a Friend in Need"
ink rgb(0,20,255),0
center text 321,241, "Welcome to a Friend in Need"
ink rgb(255,255,255),0
center text 320,260, "A Game About Transfering Energy"
ink rgb(0,20,255),0
center text 321,261, "A Game About Transfering Energy"
ink rgb(255,255,255),0
center text 320,280, "Press [A] to Continue"
ink rgb(0,20,255),0
center text 321,281, "Press [A] to Continue"
ink rgb(255,255,255),0
do
if inkey$()="a"
do
if inkey$()<>"a" then cls : exit
loop
exit
endif
loop
ink rgb(255,255,255),0
center text 320,240, "Drive to Your Friend Who"
ink rgb(0,20,255),0
center text 321,241, "Drive to Your Friend Who"
ink rgb(255,255,255),0
center text 320,260, "Is Low On Energy,"
ink rgb(0,20,255),0
center text 321,261, "Is Low On Energy,"
ink rgb(255,255,255),0
center text 320,280, "Only You Can Save Him!!!"
ink rgb(0,20,255),0
center text 321,281, "Only You Can Save Him!!!"
ink rgb(255,255,255),0
center text 320,300, "Press [S] to Continue"
ink rgb(0,20,255),0
center text 321,301, "Press [S] to Continue"
ink rgb(255,255,255),0
do
if inkey$()="s"
do
if inkey$()<>"s" then cls : exit
loop
exit
endif
loop
center text 320,220, "********************"
ink rgb(0,20,255),0
center text 321,221, "********************"
ink rgb(255,255,255),0
center text 320,240, "Press [P] To Start"
ink rgb(0,20,255),0
center text 321,241, "Press [P] To Start"
ink rgb(255,255,255),0
center text 320,260, "********************"
ink rgb(0,20,255),0
center text 321,261, "********************"
ink rgb(155,255,255),0
do
if inkey$()="p"
do
if inkey$()<>"p" then cls :exit
loop
exit
endif
loop
rem ****____****_____loading section____****____****
load image "E:\My DBPRO Games\Edutainment\images\sky_texture.jpg",1
load music "E:\My DBPRO Games\Edutainment\sounds\car_revving.mp3",1
load sound "E:\My DBPRO Games\Edutainment\sounds\car_explosion.wav",2
rem ****____****____MainSection Loop____****____****
MainSection:
make object cube 1,50
scale object 1, 15,20,20
color object 1, rgb(255,0,0)
position object 1,-500,-300,-500
rotate object 1,0,45,0
color backdrop rgb(25,0,100)
position camera 0,85,-5
point camera 0,60,60
set camera range 1,4000000000000
play music 1
loop music 1
rem ****____****____ other oject creation ____****____****
NumberOfBuildings = 75
for t = 1 to NumberOfBuildings
make object cube t + NumberOfBuildings ,100
scale object t +NumberOfBuildings,200,750,200
color object t + NumberOfBuildings , rgb(0,255,100)
position object t + NumberOfBuildings ,Rnd(7500)-950,30,Rnd(7500)-950
rem make object collision box t + NumberOfBuildings ,-100,-375,-100,100,375,100,0 rem ))))))))))))))
set object collision to polygons t + NumberOfBuildings
next t
NumberOfBuildings2 = 37
for x = 1 to NumberOfBuildings2
make object cube x + NumberOfBuildings2 ,150
scale object x +NumberOfBuildings2,250,200,275
color object x + NumberOfBuildings2 , rgb(100,0,100)
position object x + NumberOfBuildings2 ,Rnd(7500)-950,-200,Rnd(7500)-950
rem make object collision box t + NumberOfBuildings ,-100,-375,-100,100,375,100,0 rem ))))))))))))))
set object collision to polygons x + NumberOfBuildings2
next x
rem ****____****____ Collision and Motion Section ____****____****
do
oldx#=x#
oldz#=z#
rem store angle
ay# = object angle Y(1)
rem key input
if upkey()=1 then move object 1,0.25
if downkey()=1 then move object 1,-0.25
if leftkey()=1 then ay# = wrapvalue(ay#-0.20)
if rightkey()=1 then ay# = wrapvalue(ay#+0.20)
if spacekey()=1 then move object 1,0.375 : cdn# = cnd# - 15
if inkey$()="q" then end
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
position object 1,x#,y#,z#
`sliding collision cheking
`-----------------------------------
if object collision(1,0)>0:gosub zzol
if object collision(1,0)=0:z#=oldz#
endif
endif
if object collision(1,0)>0:gosub xxol
if object collision(1,0)=0:x#=oldx#
endif
endif
if object collision(1,0)>0
x#=oldx#:z#=oldz#
endif
`------------------------------------
cdn# = 55
rem rotate object
yrotate object 1,ay#
set camera to follow object position x(1), object position y(1), object position z(1), object angle y(1), 5, 15, cdn#, 0
rem ****____****____ boost and health section ____****____****
if spacekey()=1 then dec BOOST#,5
BOOST# = 100
HEALTH# = 100
center text 320,425,"BOOST = " + str$(BOOST#)
center text 320,435, "HEALTH = " + str$(HEALTH#)
loop
xxol:
POSITION OBJECT 1,oldx#,y#,z#
play sound 2
play music 1
loop music 1
return
zzol:
POSITION OBJECT 1,x#,y#,oldz#
play sound 2
play music 1
loop music 1
return
wait key