OK
Actually I have done quite a bit with c++ and have worked with the reaction engine some, most was in making console programs. I avoided matrixes and set individual planes for the ground (and ceiling) so that I only needed to place them where the player could see them and avoid making poly's where they may not be needed. I had tried a matrix first but it was substantially slower. The fact that dbpro autohides geometry makes me think it would probably enhance the performance quite a bit.
Is the format identicle? if i load up my DBC program in DBpro roughly what percentage would I need to change? I am not using collision detection with the objects I instead have an array that knows where you can pass and not as I found this also sped things up for me.
function Draw_map(noo,map_type)
number_of_objects=noo
for a = 1 to 31
for b = 1 to 31
if map_across(a,b,1)=1 or map_across(a,b,1)=3
make object plain number_of_objects,20,20
position object number_of_objects,(b-1)*-20+10,10,(a-1)*20+10
texture object Number_of_objects,map_across(a,b,2)
if map_across(a,b,4)=1 then set object number_of_objects,1,0,0
number_of_objects=number_of_objects+1
endif
if map_across(a,b,1)=2 or map_across(a,b,1)=4
make object plain number_of_objects,20,20
position object number_of_objects,(b-1)*-20+10,10,(a-1)*20+10
texture object Number_of_objects,map_across(a,b,2)
if map_across(a,b,4)=1 then set object number_of_objects,1,0,0
number_of_objects=number_of_objects+1
make object plain number_of_objects,20,20
position object number_of_objects,(b-1)*-20+10,30,(a-1)*20+10
texture object Number_of_objects,map_across(a,b,3)
if map_across(a,b,5)=1 then set object number_of_objects,1,0,0
number_of_objects=number_of_objects+1
endif
next b:next a
for a = 1 to 31
for b = 1 to 31
if map_down(a,b,1)=1 or map_down(a,b,1)=3
make object plain number_of_objects,20,20
yrotate object number_of_objects,90
position object number_of_objects,(b-1)*-20+20,10,(a-1)*20+20
texture object Number_of_objects,map_down(a,b,2)
if map_down(a,b,4)=1 then set object number_of_objects,1,0,0
number_of_objects=number_of_objects+1
endif
if map_down(a,b,1)=2 or map_down(a,b,1)=4
make object plain number_of_objects,20,20
yrotate object number_of_objects,90
position object number_of_objects,(b-1)*-20+20,10,(a-1)*20+20
texture object Number_of_objects,map_down(a,b,2)
if map_down(a,b,4)=1 then set object number_of_objects,1,0,0
number_of_objects=number_of_objects+1
make object plain number_of_objects,20,20
yrotate object number_of_objects,90
position object number_of_objects,(b-1)*-20+20,30,(a-1)*20+20
texture object Number_of_objects,map_down(a,b,3)
if map_down(a,b,5)=1 then set object number_of_objects,1,0,0
number_of_objects=number_of_objects+1
endif
next b:next a
`draw floor
for a = 1 to 31
for b = 1 to 31
if map_floor(a,b,1)=1
make object plain number_of_objects,20,20
xrotate object number_of_objects,90
position object number_of_objects,(b-1)*-20+10,0,(a-1)*20+20
texture object number_of_objects,map_floor(a,b,2)
number_of_objects=number_of_objects+1
endif
next b:next a
`draw_ceiling
for a = 1 to 31
for b = 1 to 31
if map_ceiling(a,b,1)=1
make object plain number_of_objects,20,20
xrotate object number_of_objects,90
position object number_of_objects,(b-1)*-20+10,20,(a-1)*20+20
texture object number_of_objects,map_ceiling(a,b,2)
number_of_objects=number_of_objects+1
endif
if map_ceiling(a,b,1)=2
make object plain number_of_objects,20,20
xrotate object number_of_objects,90
position object number_of_objects,(b-1)*-20+10,40,(a-1)*20+20
texture object number_of_objects,map_ceiling(a,b,2)
number_of_objects=number_of_objects+1
endif
next b:next a
for a = 1 to 31
for b = 1 to 31
if object(a,b)=1
load object "tree1.3ds",number_of_objects
position object number_of_objects,(b-1)*-20+10,0,(a-1)*20+20
color limb number_of_objects,1,rgb(98,44,12)
number_of_objects=number_of_objects+1
endif
if object(a,b)=2
load object "cross.3ds",number_of_objects
position object number_of_objects,(b-1)*-20+10,0,(a-1)*20+20
color object number_of_objects,rgb(87,87,87)
number_of_objects=number_of_objects+1
endif
next b
next a
endfunction number_of_objects
This is the draw routine I have, it draws the map in about 1-2 seconds, each map is laid out on a 30x30 grid and each space has a spot to add a plane for any wall or the ground or ceiling, as well as place an object.
This is the movement routine I am using
repeat
cls
if leftkey()=1
for a = angle to angle-60 step -30
yrotate camera wrapvalue(a)
sync
next a
a = angle -90
yrotate camera wrapvalue(a)
sync
angle=a
endif
if rightkey()=1
for a = angle to angle+60 step 30
yrotate camera wrapvalue(a)
sync
next a
a = angle +90
yrotate camera wrapvalue(a)
sync
angle=a
endif
if upkey()=1
allow=1
if wrapvalue(angle)=0 and map_across(playery+1,playerx,1)<=2 and map_across(playery+1,playerx,1)>=1 then allow=0
if wrapvalue(angle)=180 and map_across(playery,playerx,1)>=1 and map_across(playery,playerx,1)<=2 then allow=0
if wrapvalue(angle)=270 and map_down(playery,playerx+1,1)>=1 and map_down(playery,playerx+1,1)<=2 then allow=0
if wrapvalue(angle)=90 and map_down(playery,playerx,1)>=1 and map_down(playery,playerx,1)<=2 then allow=0
if allow=1
for a= 1 to 2
move camera 10
sync
next a
sync
if wrapvalue(angle)=0 then playery=playery+1
if wrapvalue(angle)=270 then playerx=playerx+1
if wrapvalue(angle)=180 then playery=playery-1
if wrapvalue(angle)=90 then playerx=playerx-1
endif
endif
if downkey()=1
allow=0
if wrapvalue(angle)=0 then angle=180:allow=1
if wrapvalue(angle)=180 and allow=0 then angle=0:allow=1
if wrapvalue(angle)=270 then angle=90:allow=1
if wrapvalue(angle)=90 and allow=0 then angle=270:allow=1
repeat
until downkey()=0
endif
yrotate camera wrapvalue(angle)
position camera playerx*-20+30,10,playery*20
orbit=orbit+1
if orbit>50 then cycle=cycle+1:orbit=0
if cycle>360 then cycle=1
yrotate object skybox,WRAPVALUE(cycle)
if inkey$()="q" then done=1
sync
until done=1