hey guys i though this was a cool game so im posting it its not mine its sombody elses im just posting it becuz i thought it was good
remstart
Pooooool 3D - Created by Beavis
Type : pool-like game
Purpose : 20-line competition
Goal : Shot all spheres by blue sphere in fewest shots
Controls : left/right arrow = angle spacebar=power of shot
Developing time : 70 min.
Lines without comments and spaces : 18
Development tool : Dark Basic Professional (patch 4.1)
remend
`init
randomize timer() : set global collision on :sync on : sync rate 60 : autocam off :position camera 500,500,-500 :point camera 500,0,350
`creating of table and spheres
angle=0 : shots=0 : points=0 : dim ball#(40,4) : uhel=0 : speed#=0 : flagspeed=0 :make object box 98, 1000, 10, 700 : position object 98, 500, 0 , 350 : color object 98, rgb(0, 128, 0) : make object box 100,30,30,700 : make object box 101,30,30,700 : make object box 102,30,30,1060 : make object box 103,30,30,1060 : color object 100, rgb (60,60,0) : color object 101, rgb (60,60,0) : color object 102, rgb (60,60,0) : color object 103, rgb (60,60,0) : position object 100,-15, 15, 350 : position object 101,1015, 15, 350 : position object 102,500, 15, -15 : position object 103,500, 15, 715 : rotate object 102, 0, 90, 0 : rotate object 103, 0, 90, 0 : make object box 99, 10, 10, 500 : color object 99, rgb(100,100,0)
for id=1 to 40 : make object sphere id, 40 : set object collision to spheres id : set object collision on id : color object id, rgb(255-id*5,255-id*5,255-id*5) : ball#(id,0)=rnd(1000-50)+25 : ball#(id,1)=rnd(700-50)+25 : ball#(id,2)=0 : ball#(id,3)=0 : position object id, ball#(id,0), 25, ball#(id,1) : next i : color object 1, rgb (0, 0, 200)
`gameloop
do
`power of shot
if spacekey()=0 and moving=0 and speed#=0 : flagspeed=0 : endif : if spacekey()=1 and moving=0 and flagspeed=0 and speed#<100 : speed#=speed#+1 : endif : if spacekey()=0 and moving=0 and speed#>0 : flagspeed=1 : endif
if spacekey()=0 and moving=0 and flagspeed=1 : ball#(1,2)=sin(uhel)*speed# : ball#(1,3)=cos(uhel)*speed# : speed#=0 : flagspeed=0 : shots=shots+1 : endif
`angle of shot
if leftkey() : uhel=wrapvalue(uhel+2) : endif : if rightkey() : uhel=wrapvalue(uhel-2) : endif
`infos
center text screen width()/2, 0, \"Pooooool 3D ©2003 Beavis\" : center text screen width()/2,15,\"you must shot all speres by blue sphere\" : center text screen width()/2, 30, \"controlig game : left + right arrow = aim spacebar=power of shooting\" : text 0, 45, \"Shots : \"+str$(shots) : text 0, 60, \"Spheres left : \"+str$(39-points)
`moving sphere, check for hits
for i=1 to 40
ball#(i,2)=ball#(i,2)*0.98 : ball#(i,3)=ball#(i,3)*0.98 : ball#(i,0)=ball#(i,0)+ball#(i,2) : ball#(i,1)=ball#(i,1)+ball#(i,3)
if ball#(i,2)<0.1 and ball#(i,2)>-0.1 : ball#(i,2)=0 : endif : if ball#(i,3)<0.1 and ball#(i,3)>-0.1 : ball#(i,3)=0 : endif : if ball#(i,1)>675 : ball#(i,3)=-ball#(i,3) : ball#(i,1)=675 : endif : if ball#(i,1)<25 : ball#(i,3)=-ball#(i,3) : ball#(i,1)=25 : endif : if ball#(i,0)>975 : ball#(i,2)=-ball#(i,2) : ball#(i,0)=975 : endif : if ball#(i,0)<25 : ball#(i,2)=-ball#(i,2) : ball#(i,0)=25 : endif
position object i, ball#(i,0), 25, ball#(i,1) : if i>1 and object collision (1,i)=1 : hide object i : set object collision off i : points=points+1 : endif
next i
moving=0 : for i=1 to 40 : if ball#(i,2)<>0 or ball#(i,3)<>0 : moving=1 : endif : next i
`check for winning condition + some camera shaking
if points=39 : center text screen width()/2,200,\"YOU WON ! Shots=\"+str$(shots) : sync : wait 5000 : exit : endif
position camera 500,500,0 : angle=wrapvalue(angle+1) : rotate camera 0,angle,0 : move camera -500 : point camera ball#(1,0),0,ball#(1,1)
if moving=0 : show object 99 : position object 99, ball#(1,0), 25, ball#(1,1) : rotate object 99, 0, uhel, 0 : pitch object down 99, 5 : move object 99, -(280+speed#*3) : else : hide object 99 : uhel=object angle y(1) : endif : sync
loop
crzy programer