If you make an object with lots of limbs and yet hide most of them, the FPS is still very low. With this test code there are 4096 limbs and only 1 is unhidden (12 polys) yet the max fps is 50
`display stuff
sync on : sync rate 0
set camera range .5, 1500
autocam off
position camera 0, 0, -30
hide mouse
set global collision off
cubesize# = 10.0
`make test object with 4096 limbs
a = 1
depth# = 0
wide# = 0
`tall
for j = 1 to 64
`across
for k = 1 to 64
if j = 1 and k = 1
make object cube 1, cubesize#
make mesh from object 1, 1
position object a, wide#, 0, depth#
else
add limb 1, a, 1
offset limb 1, a, (k-1)*20, 0, (j-1)*20
inc a, 1
endif
next k
next j
calculate object bounds 1
set object collision off 1
for i = 1 to 4095
hide limb 1, i
next i
do
`mlook
rotate camera camera angle x()+(mousemovey()/2),camera angle y()+(mousemovex()/2),0
if camera angle x()>90 then xrotate camera 90
if camera angle x()<-90 then xrotate camera -90
cx#=camera angle x() : cy#=camera angle y() : cz#=camera angle z()
`simple flying movement
if upkey()=1
move camera 3
endif
if downkey()=1
move camera -3
endif
if rightkey()=1
xrotate camera 0: yrotate camera cy# + 90: move camera 3: xrotate camera cx#: yrotate camera cy#
endif
if leftkey()=1
xrotate camera 0: yrotate camera cy# - 90: move camera 3: xrotate camera cx#: yrotate camera cy#
endif
set cursor 0,0
print "FPS : ",screen fps()," Polys : ",statistic(1)
sync
loop
end
Using the same code but modified to use hidden objects instead of limbs the max is 60 fps
`display stuff
sync on : sync rate 0
set camera range .5, 1500
autocam off
position camera 0, 0, -30
hide mouse
set global collision off
cubesize# = 10.0
`make test object with 4096 limbs
a = 2
depth# = 0
wide# = 0
`tall
for j = 1 to 64
`across
for k = 1 to 64
if j = 1 and k = 1
make object cube 1, cubesize#
position object 1, wide#, 0, depth#
else
clone object a, 1
position object a, (k-1)*20, 0, (j-1)*20
set object collision off 1
hide object a
inc a, 1
endif
next k
next j
do
`mlook
rotate camera camera angle x()+(mousemovey()/2),camera angle y()+(mousemovex()/2),0
if camera angle x()>90 then xrotate camera 90
if camera angle x()<-90 then xrotate camera -90
cx#=camera angle x() : cy#=camera angle y() : cz#=camera angle z()
`simple flying movement
if upkey()=1
move camera 3
endif
if downkey()=1
move camera -3
endif
if rightkey()=1
xrotate camera 0: yrotate camera cy# + 90: move camera 3: xrotate camera cx#: yrotate camera cy#
endif
if leftkey()=1
xrotate camera 0: yrotate camera cy# - 90: move camera 3: xrotate camera cx#: yrotate camera cy#
endif
set cursor 0,0
print "FPS : ",screen fps()," Polys : ",statistic(1)
sync
loop
end
using objects with exclude object on instead of hiding gives you a 230 fps max.
`display stuff
sync on : sync rate 0
set camera range .5, 1500
autocam off
position camera 0, 0, -30
hide mouse
set global collision off
cubesize# = 10.0
`make test object with 4096 limbs
a = 2
depth# = 0
wide# = 0
`tall
for j = 1 to 64
`across
for k = 1 to 64
if j = 1 and k = 1
make object cube 1, cubesize#
position object 1, wide#, 0, depth#
else
clone object a, 1
position object a, (k-1)*20, 0, (j-1)*20
set object collision off 1
exclude object on a
inc a, 1
endif
next k
next j
do
`mlook
rotate camera camera angle x()+(mousemovey()/2),camera angle y()+(mousemovex()/2),0
if camera angle x()>90 then xrotate camera 90
if camera angle x()<-90 then xrotate camera -90
cx#=camera angle x() : cy#=camera angle y() : cz#=camera angle z()
`simple flying movement
if upkey()=1
move camera 3
endif
if downkey()=1
move camera -3
endif
if rightkey()=1
xrotate camera 0: yrotate camera cy# + 90: move camera 3: xrotate camera cx#: yrotate camera cy#
endif
if leftkey()=1
xrotate camera 0: yrotate camera cy# - 90: move camera 3: xrotate camera cx#: yrotate camera cy#
endif
set cursor 0,0
print "FPS : ",screen fps()," Polys : ",statistic(1)
sync
loop
end
If the limb is hidden and all collisions are set to off then what is slowing DBP down?
What else is there to consider in the calcs?
Could we possibly have an exclude limb on command?