Finally I got back to coding and made another 20 liner
5-Commands per line exept two lines(I could fit it in
) which have 6 and 8 commands
This one adds/fixes a lot of things including:
-Optimized code
-All-new colored platform
-Better physics
-SHADOWS
-No more out of boundries bug!
-The spheres are now boxes!
Check out the compiled version:
http://dbforums.co.uk/piratss/Balance%20Out%20II.zip
P.S: Doesn't seem to work in DBPro
sync on:hide mouse:maxobj=2+2:dim objsin#(maxobj-3):dim objy#(maxobj-3)
make object box 1, 80,2,80:make object sphere 2,6:color object 2,rgb(255,0,0):make object sphere 65535,6:color object 65535,rgb(0,0,0)
scale object 65535,100,1,100:for g=1 to 255 step 3:tatta=tatta+1:matta=0:for b=1 to 255 step 3
ink rgb(255-g,b,g),0:matta=matta+1:dot matta,tatta:next b:next g
get image 1,1,1,80,80:color backdrop rgb(0,0,0):for i=3 to maxobj:tmp=2+rnd(3):make object box i,2+tmp,2+tmp,2+tmp
color object i,rgb(rnd(255),rnd(255),rnd(255)):next i
reset:
score=0:x#=0:y#=0:z#=0:speedl#=0:speedu#=0:speedbu#=0:speedbl#=0:u#=0:l#=0
for i=3 to maxobj:position object i,-30+rnd(60),tmp+1,-30+rnd(60):objy#=object position y(i):next i:texture object 1,1
do:if upkey()=1:speedu#=speedu#-.01:endif:if downkey()=1
speedu#=speedu#+.01:endif:if leftkey()=1:speedl#=speedl#-.01:endif
if rightkey()=1:speedl#=speedl#+.01:endif:u#=wrapvalue(u#+speedu#):l#=wrapvalue(l#+speedl#)
rotate object 1,u#,0,l#:speedbl#=speedbl#+speedl#/50:speedbu#=speedbu#-speedu#/50:x#=x#-speedbl#-speedl#/50:z#=z#-speedbu#-speedu#/50
y#=cos(180-90-object angle z(1))*x#+4+cos(180-90-object angle x(1))*(z#*-1):ink rgb(255,255,0),0:center text 320,2,"/Balance Out II By: Michael Kloubkov":center text 320,22,"Current score: "+str$(score):fade object 1,20
for i=3 to maxobj:rotate object i,u#,0,l#:objsin#(i-3)=cos(180-90-object angle z(1))*object position x(i)+3.5+cos(180-90-object angle x(1))*(object position z(i)*-1):position object i,object position x(i),objy#(i-3)+objsin#(i-3),object position z(i)
if object collision(2,i)=1:score=score+1:color object i,rgb(rnd(255),rnd(255),rnd(255)):position object i,-30+rnd(60),tmp+4,-30+rnd(60):endif
next i:if x#>40 or x#<-40 or z#>40 or z#<-40:for i=1 to 40:y#=y#-i/2:position object 2,x#,y#,z#
point camera x#,y#,z#:sync:next i:while inkey$()="":center text 320,240,"You lose! Final score: "+str$(score)
center text 320,260,"Press any key to restart!":sync:endwhile:goto reset:endif
position object 2,x#,y#,z#:position object 65535,x#,y#-2.8,z#:rotate object 65535,u#,0,l#:position camera 0,40-y#/20,90:point camera 0,0,0:sync:loop
Dual AMD Athlon MP 2x1GHZ | IBM 15000Rpm SCSI 73.4 Gb X 2 | e-GeForce Ti4400 | Audigy 2 + 7.1 Surround sound | 17' Monitor | Ugly mouse