Thanks, I've decided instead of carrying on with Pong I'd update a few things (Randomized start angle now) and added a help system, then I'd start on a small scale RPG...so here's the update
Edit: Decided to release the source for people who want to expand it.
REM Project: Pong 3d
REM Created: 29/03/2008 16:48:24
REM
REM ***** Main Source File *****
REM
Rem Setup
sync on
sync rate 40
set display mode 1024, 768, 32
autocam off
rem vars
global pause
global speed#
rem
text screen width()/2, screen width()/2, "LOADING PLEASE WAIT"
menu()
speed:
speed_()
return
game:
Rem Main
load image "Backdrop.jpg", 1, 1
load image "Sand0047_1_S.jpg",2 ,1
load image "StarfishTex.jpg", 3, 1
load image "Paused.png", 4, 1
load image "bubble.tga", 10, 1
sprite 1, screen width()/2-199, screen height()/2, 4
hide sprite 1
REM Models
make object plain 5, 100, 10
position object 5, 0, 0, 15
load object "AMBLY_L.x", 1
load object "AMBLY_L.x", 2
scale object 1, 0.75, 0.75, 0.75
rotate object 1, 0, 90, 0
rotate object 2, 0, 270, 0
scale object 2, 0.75, 0.75, 0.75
position object 2, -10, 30057, 0
position object 1, 10, 30057, 0
load object "starfish.x", 3
scale object 3, 2.5, 2.5, 2.5
position camera 0,10,-10
point camera 0,0,0
make object box 4,35,0.1,15
position object 4, 0, -0.55, 0
texture object 5, 1
texture object 4, 2
texture object 3, 3
SET OBJECT NORMALS 1
SET OBJECT NORMALS 2
rem LOOP
balla#=70
PlayerScore#=0
EnemyScore#=0
particles()
do
ballx#=newxvalue(ballx#, balla#, 0.3)
ballz#=newzvalue(ballz#, balla#, 0.3)
if ballz# > EnemyPositionZ# + 0.5 and EnemyPositionZ#<5 then EnemyPositionZ# = EnemyPositionZ# + speed#
if ballz# < EnemyPositionZ# - 0.5 and EnemyPositionZ#>-2 then EnemyPositionZ# = EnemyPositionZ# - speed#
if upkey()=1 and PlayerPositionZ#<5.5 then PlayerPositionZ#=PlayerPositionZ#+0.5
if downkey()=1 and PlayerPositionZ#>-2.5 then PlayerPositionZ#=PlayerPositionZ#-0.5
if upkey()=1 and ballx#>-10.5 and ballx#<-10 then balla#=balla#+8
if downkey()=1 and ballx#>-10.5 and ballx#<-10 then balla#=balla#-8
if keystate(31)=1 and ballx#>10 and ballx#<10.5 then balla#=balla#-8
if ballx#>10.5 then EnemyScore#=EnemyScore#+1:ballx#=0:ballz#=0: repeat : balla# = rnd( 360 ) :until ( balla# <> 90 ) and ( balla# <> 270 )
if ballx#<-10.5 then PlayerScore#=PlayerScore#+1:ballx#=0:ballz#=0: repeat : balla# = rnd( 360 ) :until ( balla# <> 90 ) and ( balla# <> 270 )
rem Inkey codes
if inkey$()="p" and pause=0 then pause()
if inkey$()="h"
text screen width()/2, 30, "Controls: "
text screen width()/2, 40, "Up & Down move your fish"
text screen width()/2, 50, "P to Pause"
text screen width()/2, 62, "` to exit when paused"
text screen width()/2, 72, "R to resume when paused"
pause()
endif
rem Ball
if ballx#>10 and ballx#<10.5 and abs(EnemyPositionZ#-ballz#)<1.5 then balla#=360-balla#
if ballx#<-10 and ballx#>-10.5 and abs(PlayerPositionZ#-ballz#)<1.5 then balla#=360-balla#
if ballz#>5.5 or ballz#<-2.5 then balla#=180-balla#
balla#=wrapvalue(balla#)
yrotate object 3, balla#
position object 3, ballx#, 0, ballz#
position object 2, 10, 0, EnemyPositionZ#
position object 1, -10, 0, PlayerPositionZ#
text screen width()/2, 10, "Score: "+str$(PlayerScore#)+" : "+str$(EnemyScore#)
text 10, 10, "Press H for help"
sync
loop
return
function menu()
hide mouse
load image "Fishy_Pong.jpg", 1, 1
sprite 1, 0, 0, 1
load image "Play.png", 2, 1
load image "Exit.png", 3, 1
load image "Cursor.png", 4, 1
sprite 3, 10, 50, 2
sprite 4, 10, 110, 3
do
sprite 2, mousex(), mousey(), 4
if sprite hit(2, 3) and mouseclick()=1
delete sprite 1
delete sprite 3
delete sprite 4
delete image 1
delete image 3
delete image 2
gosub speed
endif
if sprite hit(2, 4) and mouseclick()=1
delete sprite 2
delete sprite 3
delete sprite 4
end
endif
sync
loop
endfunction
function pause()
if inkey$()="p"
do
show sprite 1
text screen width()/2, 10, "Press R to Resume and ` to exit"
if inkey$()="`" then end
if inkey$()="r" then hide sprite 1 : exit
sync
loop
endif
endfunction
function particles()
make particles 1, 10, 1, 20
position particles 1, 0, -175, 0
set particle gravity 1, 0.2
endfunction
function speed_()
load image "1.png", 1, 1
load image "2.png", 2, 1
load image "3.png", 3, 1
load image "Fishy_Pong.jpg", 5, 1
sprite 5, 0, 0, 5
sprite 1, screen width()/2, screen height()/2-100, 1
sprite 3, screen width()/2, screen height()/2, 2
sprite 4, screen width()/2, screen height()/2+100, 3
do
sprite 2, mousex(), mousey(), 4
set sprite priority 2, 1000
if sprite hit(2, 1) and mouseclick()=1 then speedClick=1
if sprite hit(2, 3) and mouseclick()=1 then speedClick=2
if sprite hit(2, 4) and mouseclick()=1 then speedClick=3
if speedClick=1 then speed#=0.13 : delete image 4 : delete image 5 : delete sprite 5 : delete sprite 2 : delete sprite 3 : delete sprite 4 : delete image 1 : delete image 2 : delete image 3 : gosub game
if speedClick=2 then speed#=0.07 : delete image 4 : delete image 5 : delete sprite 5 : delete sprite 2 : delete sprite 3 : delete sprite 4 : delete image 1 : delete image 2 : delete image 3 : gosub game
if speedClick=3 then speed#=0.03 : delete image 4 : delete image 5 : delete sprite 5 : delete sprite 2 : delete sprite 3 : delete sprite 4 : delete image 1 : delete image 2 : delete image 3 : gosub game
sync
loop
endfunction speed#
`fast = 0.13#
`medium 0.07#
`slow = 0.03#
Coding again =O - Dedicated Paramore Fan
