Just trying to build up a 3D pong game, simple and fun. Apparently I suck so hard I can't get the ball not to go through the GD paddles.
REM Project: pong
REM Created: 4/11/2010 3:34:05 PM
REM
REM ***** Main Source File *****
REM
players:
cls
print "Indicate the number of players ['1' or '2']"
input ":> ";players
if players > 2 then gosub players
if players < 1 then gosub players
cls
make object box 1,2,1,.5 : position object 1,0,0,-5
make object box 2,2,1,.5 : position object 2,0,0,5
make object sphere 3,1
if players=1 then position camera 0,5,-10
if players=2 then position camera -10,10,0
set object collision on 3
rem set object collision to spheres 3
yrotate object 3,wrapvalue(object angle y(3)+rnd(10))
set cursor 320,240
print "PRESS SPACE TO START"
wait spacekey()
cls
do
point camera 0,0,0
move object 3,.01
for ob=1 to 2
oldx=object position x(ob)
if object angle y(3) > 45
if object angle y(3) < 135
yrotate object 3,wrapvalue(object angle y(3)+90)
endif
endif
if object angle y(3) > 225
if object angle y(3) < 315
yrotate object 3,wrapvalue(object angle y(3)-90)
endif
endif
if object collision(3,ob)
yrotate object 3,wrapvalue(object angle y(3)+(180+(oldx-object position x(ob)*10)))
if ob=1
if object angle y(3) > 90
if object angle y(3) < 270
yrotate object 3,wrapvalue(object angle y(3)+180)
endif
endif
endif
if ob=2
if object angle y(3) < 90
if object angle y(3) > 270
yrotate object 3,wrapvalue(object angle y(3)+180)
endif
endif
endif
endif
next ob
if leftkey()=1 then move object left 1,.01
if leftkey()=1 then move object left 2,.01
if rightkey()=1 then move object right 1,.01
if rightkey()=1 then move object right 2,.01
loop
I'm sorry, that signature was crazy. Hopefully you don't have to erase this one, too. This signature isn't as much as a freekaleek. =P