I whipped this up to see how bad DBPS internal collision commands were and was suprised by the result, there aint a lot of slowdown when using a small amount of objects.
[made & tested with DBP 5.2]
anyway check this out
sync on : sync rate 60 : randomize timer()
set global collision on
rem boulders
for i = 1 to 100
make object cube i,rnd(10)+5
position object i,rnd(100)-50,0,rnd(100)-50
rotate object i,0,rnd(365),0
ghost object on i
rndgry = rnd(255)
color object i,rgb(rndgry,rndgry,rndgry)
next i
rem player
make object cube 101,2 : position object 101,0,0,0
rem flames
make object cone 102,2 : position object 102,0,0,-2
rotate object 102,90,0,0 : scale object 102,100,200,100
ghost object on 102
glue object to limb 102,101,0
thruststep#=0.01
turnstep#=5.0
friction#=0.97
rem BULLET CODE CREATION
rem create the objects for the bullets
bulletsize# = 1.5
for t= 0 to 5
make object cube t+200, bulletsize# : hide object t+200
next t
rem BULLET ARRAYS
rem we'll be using arrays to control bullets
dim bx#(5)
dim bz#(5)
dim bxvel#(5)
dim bzvel#(5)
dim bulletlife(5)
bulletspeed#=1.0
rem camera setup
position camera 0,150,0 : point camera 0,0,0
while spacekey()=0
ink rgb(0,0,0),1
box 0,0,screen width(),64
ink rgb(255,255,255),1
text 10,10,"Disaster-oids"
text 10,25,"Press space to start"
text 10,40,"arrowkeys to move , space to fire"
sync
endwhile
disable escapekey : while escapekey()=0
rem controls
if rightkey()=1 then an#=an#+turnstep#
if leftkey()=1 then an#=an#-turnstep#
rem angle wrapping
an#=wrapvalue(an#)
if upkey()=1
thrust#=friction#-thrust#+thruststep#
thrust#=thrust#*0.05
show object 102
else
hide object 102
thrust#=thrust#-thruststep#
thrust#=thrust#*0.1
endif
if downkey()=1
thrust#=thrust#-thruststep#
thrust#=thrust#*0.1
endif
rem bulletfire
if spacekey()=1
b=0
repeat
if bulletlife(b)=0
show object b+200
yrotate object 200+b,an#
bulletlife(b)=60
bx#(b)=x#
bz#(b)=z#
bxvel#(b)=(sin(an#)*bulletspeed#)+xvel#
bzvel#(b)=(cos(an#)*bulletspeed#)+zvel#
exit
endif
b=b+1
until b=5
endif
xvel#=xvel#+(sin(an#)*thrust#)
zvel#=zvel#+(cos(an#)*thrust#)
xvel#=xvel#*friction#
zvel#=zvel#*friction#
x#=x#+xvel#
z#=z#+zvel#
yrotate object 101,an#
position object 101,x#,y#,z#
rem bullet
for b=0 to 5
if bulletlife(b)>0
bulletlife(b)=bulletlife(b)-1
bx#(b)=bx#(b)+bxvel#(b)
bz#(b)=bz#(b)+bzvel#(b)
position object 200+b,bx#(b),y#,bz#(b)
if bulletlife(b)=0 then hide object b+200
endif
next b
rem player screen edges
if x# > 100 then x# = -100
if x# < -100 then x# = 100
if z# > 100 then z# = -100
if z# < -100 then z# = 100
rem boulder screen edges
for i = 1 to 100
move object i,0.1
roll object left i,1
if object position x(i) > 100 then position object i,-100,0,object position z(i)
if object position x(i) < -100 then position object i,100,0,object position z(i)
if object position z(i) > 100 then position object i,object position z(i),0,-100
if object position z(i) < -100 then position object i,object position z(i),0,100
next i
rem ship with rock
for c = 1 to 100
if OBJECT COLLISION(101,c)=1
hide object c
endif
next c
rem bullet with rock
for b = 201 to 205
for r = 1 to 100
if OBJECT COLLISION(r,b)=1
hide object r
endif
next b
next r
text 10,10,"fps : "+STR$(screen fps())
sync : endwhile
backdrop off
ink rgb(0,0,0),1
box 0,0,screen width(),screen height()
ink rgb(255,255,255),1
text 10,10,"exiting game."
sync : sync : wait 100
undim bx#(5)
undim bz#(5)
undim bxvel#(5)
undim bzvel#(5)
undim bulletlife(5)
for i = 1 to 100
delete object i
next i
delete object 101
end
fall down seven times, stand up eight