okay so im making my pong game with no sprites i got the text thing taken care of thanks to you guys. but now i have another issue. its not causing any problems at current. but sometimes my paddles Y-position will jump from 0-100 to around 900 its really wierd. heres my source:
Rem Project: pong8
Rem Created: 4/12/2008 8:57:53 PM
Rem ***** Main Source File *****
set display mode 320,240,32
sync on
sync rate 60
hide mouse
cls 0
draw sprites first
SET TEXT OPAQUE`fixes text probelm
Remstart
begin basic variables here
////////////////////////////////////////////////remend
menu_up=1
s1=0
s2=0
p1y=83
p2y=83
bally=83
ballx=298
current_sync=0
Remstart
begin main control loop here
///////////////////////////////////////////////remend
do
if menu_up=1
`display menu
set text font "courier new"
set text size 72
text 35,30,"-PONG-"
set text size 20
text 40,100,"-Press any key to begin-"
if scancode()<>0
menu_up=0
cls 0
set text size 12
endif
else
`run game
`draw scores
text 5,5,"P2 Score: " + str$(s2)
text 155,5,"P1 Score: " + str$(s1)
`draw outline box
line 15,15,15,180
line 15,15,305,15
line 305,15,305,180
line 305,180,15,180
`draw debug info
text 15,185, "Debug information:"
text 15,195, "ball x: " + str$(ballx)
text 80,195," ball y: " + str$(bally)
text 160,195,"player1 y: " + str$(p1y)
text 240,195,"player2 y: " + str$(p2y)
text 15,205, "Constants:"
text 15,215, "top y: 15 bottom y: 180 left x: 15 right x: 305"
text 15,225, "sync: " + str$(current_sync)
`draw paddles
box 295,p1y-15,298,p1y+15
box 25,p2y-15,28,p2y+15
`move paddles
`if p1y-15<18 and p1y+15>162
if upkey()
if p1y-15>18
p1y=p1y-3
ink 0,0
box 295,p1y+15,298,p1y+18
ink rgb(255,255,255),0
endif
endif
if downkey()
if p1y+15<178
p1y=p1y+3
ink 0,0
box 295,p1y-18,298,p1y-15
ink rgb(255,255,255),0
endif
endif
`endif
endif
inc current_sync
sync
loop