In my pong game i have the variable score printed at the top of the screen and have it re-printed every time the variable changes. The problem is that when it is re-printed it goes on top of the previous print and you cannot read it. Any suggestions anyone?
Hide Mouse
Sync On
Sync Rate 60
radius# = 3.0
ballxpos = 320
ballypos = 240
ballyspeed = Rnd(4)
ballxspeed = 8
score = 0
lives = 3
Load Music "Hidden Fury.mid",1
Loop Music 1
Do
Set Text Size 50
Center Text 320,20, "PONG!"
Set Text Size 10
Line 98,98,542,98
Line 542,98,542,382
Line 542,382,98,382
Line 98,382,98,98
Create bitmap 1,25,25
Line 1,1,1,21
Get Image 1,1,1,2,22
Set Current Bitmap 0
Sprite 1,xpos,ypos,1
ypos = MouseY()
xpos = 110
If ypos 360 then ypos = 360
Create Bitmap 2,25,25
Circle 5,5,radius#
Get Image 2,1,1,10,10
Set Current Bitmap 0
Sprite 2,ballxpos,ballypos,2
ballxpos = ballxpos - ballxspeed
ballypos = ballypos + ballyspeed
If ballxpos > 534 then ballxspeed = ballxspeed * -1
If ballxpos 374 then ballyspeed = ballyspeed * -1
if ballxpos xpos - 20 and ballypos ypos - 20
ballxspeed = ballxspeed * -1
score = score + 1
Endif
center text 320,85,"Score:"+str$(score)
If Spacekey()=1 then End
Center Text 320,450, "Press Space to Exit"
Center Text 320,420, "You need 50 points to win!!"
Sync
Loop
MnKMaN