one more try......
menu
`autocam off
autocam off
`variables
ppx#=-5
ppy#=-4.1
highlight#=1
`Hide Mouse
Hide Mouse
`Load Image
load image "CLASSIC.bmp",2
load image "CLASSIC2.bmp",3
load image "2player.bmp",4
load image "2player2.bmp",5
load image "quit.bmp",6
load image "quit2.bmp",7
load image "highscores.bmp",8
load image "highscores2.bmp",9
`Load Title
load object "Pong.x",1
scale object 1,180,180,180
color object 1,rgb(0,0,255)
`make selector
make object cone 2,1
color object 2,rgb(0,0,255)
zrotate object 2,270
fix object pivot 2
`title location(for camera)
titlex#=object position x(1)
titley#=object position y(1)
titlez#=object position z(1)
`clear sprites
cls
`variable
down#=0
`Main Loop
do
`Position camera
position camera titlex#-1,titley#-4,titlex#-10
`Position selector
position object 2,ppx#,ppy#,0
`backdrop
color backdrop 0
`control
if downkey()=1 and down#=0
ppx#=ppx#-.8
ppy#=ppy#-1.2
wait 100
down#=1
highlight#=2
endif
if downkey()=1 and down#=1
ppx#=ppx#+2
ppy#=ppy#-1.4
wait 100
down#=2
highlight#=3
endif
if upkey()=1 and down#=1
ppx#=ppx#+.8
ppy#=ppy#+1.2
wait 100
down#=0
highlight#=1
endif
if upkey()=1 and down#=2
ppx#=ppx#-2
ppy#=ppy#+1.4
wait 100
down#=1
highlight#=2
endif
if downkey()=1 and down#=2
ppx#=ppx#-.6
ppy#=ppy#-1.3
wait 100
down#=3
highlight#=4
endif
if upkey()=1 and down#=3
ppx#=ppx#+.6
ppy#=ppy#+1.3
wait 100
down#=2
highlight#=3
endif
`Selects
if returnkey()=1 and down#=0
gosub 1
endif
if returnkey()=1 and down#=1
gosub 2
endif
if returnkey()=1 and down#=2
goto 3
endif
if returnkey()=1 and down#=3
gosub 4
endif
`if
if highlight#=1
sprite 2,210,230,3
set sprite 1,1,0
else
sprite 2,210,230,2
endif
if highlight#=2
sprite 4,190,280,5
set sprite 4,1,0
else
sprite 4,190,280,4
endif
if highlight#=3
sprite 6,235,330,9
set sprite 5,1,0
else
sprite 6,235,330,8
endif
if highlight#=4
sprite 8,280,380,7
set sprite 5,1,0
else
sprite 8,280,380,6
endif
`sync and loop
sync
loop
1:
2:
3:
4:
game
`sync stuff
sync on
sync rate 0
`Make background
load bitmap "stars.bmp",1
get image 1,0,0,256,256
delete bitmap 1
`random
randomize timer()
`Hide mouse
hide mouse
`autocam
autocam off
`make top
Make object box 1,30,1,1
color object 1,rgb(100,200,0)
make object collision box 1,-15,-.5,-.5,15,.5,.5,0
`make sides
make object box 2,1,24,1
make object collision box 2,-.5,-12,-.5,.5,12,.5,0
color object 2,rgb(100,200,0)
Position object 2,-15,-11.5,0
make object box 3,1,24,1
make object collision box 3,-.5,-12,-.5,.5,12,.5,0
color object 3,rgb(100,200,0)
Position object 3,15,-11.5,0
`make invisable barrior
Make object box 6,30,1,1
hide object 6
`color object 1,rgb(100,200,0)
make object collision box 6,-15,-.5,-.5,15,.5,.5,0
position object 6,0,-25,0
`Make Player
make object box 4,6,1,1
make object collision box 4,-3,-.5,-.5,3,.5,.5,0
color object 4,rgb(0,0,255)
`player position variables
plx#=object position x(1)
ply#=object position y(1)
plz#=object position z(1)
`Make ball
make object sphere 5,.8
make object collision box 5,-.4,-.4,-.4,.4,.4,.4,0
`music
load music "1.mid",1
loop music 1
`reset
Reset:
`Ball variables
bx#=0
by#=-12
bsy#=.05
bsx#=.05
`color variables
colorred#=rnd(255)
colorgreen#=rnd(255)
colorblue#=rnd(255)
`player variables
pl1x#=0
pl1y#=-23
plsx#=0
pls#=.3
mover#=0
movel#=0
colidey#=0
colidex#=0
x#=.06
rndvar#=rnd(.003)
score#=0
`main loop
do
texture backdrop 1
`score
set cursor 10,2
print "Score ";score#
`Position player
position object 4,pl1x#,pl1y#,0
`position ball
position object 5,bx#,by#,0
`start ball
bx#=bx#+bsx#
by#=by#+bsy#
`Deflection
if object collision(5,1)>0
bsy#=0-x#
endif
if object collision(5,3)>0
bsx#=0-x#
endif
if object collision(5,2)>0
bsx#=x#
endif
if object collision(5,4)>0
inc x#,.004+rndvar#
score#=score#+1
bsy#=x#
endif
`Stop player
if object collision(4,2)>0
movel#=1
else
movel#=0
endif
if object collision(4,3)>0
mover#=1
else
mover#=0
endif
`end
If by# < -25
Goto Reset
EndIf
`controls
if rightkey()=1 and mover#=0
pl1x#=pl1x#+pls#
endif
if leftkey()=1 and movel#=0
pl1x#=pl1x#-pls#
endif
`Position camera
position camera plx#,ply#-11,plz#-24
`sync and loop
sync
loop
"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."