No code showed up...
Try starting with this. I warn you though, it's about half a breakout game already
.
Sync On
Sync Rate 60
AutoCam Off
Global LastX as Float
Global LastZ as Float
Make Object Box 1,60,10,10:` A paddle
Position Object 1,0,10,20
Set Object Collision To Boxes 1
Make Object Sphere 3,10:` A ball
Position Object 3,0,10,250
Turn Object Left 3,rnd(360)
For i = 4 to 7
Make Object Box i,500,20,10:`Walls
Set Object Collision To Boxes i
Next i
`Make Playing field
Position Object 4,0,10,490
Position Object 5,-245,10,245
Turn Object Left 5,90
Position Object 6,245,10,245
Turn Object Right 6,90
Position camera 0,500,50
Point Camera 0,0,120
Do
MoveBall()
Move Object Right 1,MouseMoveX()
If Object Position X(1)<-240 Then Position Object 1,-240,Object Position Y(1),Object Position Z(1)
If Object Position X(1)>240 Then Position Object 1,240,Object Position Y(1),Object Position Z(1)
Sync
Loop
Function MoveBall()
Move Object 3,3
Select Object Collision(3,0)
Case 1
`Point the ball to the center of the paddle
Point Object 3,Object Position X(1),Object Position Y(3),Object Position Z(1)
`Turn around 180
Turn Object Left 3,180
EndCase
Case 4,7
`Far wall/Close wall
`Determine new bounce direction
NewX=Object Position X(3)+(Object Position X(3)-LastX)
NewZ=LastZ
Point Object 3,NewX,Object Position Y(3),Newz
Move Object 3,3
EndCase
Case 5,6
`Left & Right walls
NewX=LastX
NewZ=Object Position Z(3)+(Object Position Z(3)-LastZ)
Point Object 3,NewX,Object Position Y(3),Newz
Move Object 3,3
EndCase
EndSelect
LastX=Object Position X(3)
LastZ=Object Position Z(3)
EndFunction
"Droids don't rip your arms off when they lose." -H. Solo
REALITY II