Hi chafari, thanks for your reply..
It is a question of code im afraid. Basically, heres the scenario again just to be clear..
I am writting a program in dark basic pro. Editing sample code as practice for learning. I have made a model in Blender 2.58 and import it in to the program that comes with Dark Lights plugin (LightmapperIDE.exe) to calculate lightmapping. It calculates the lightmap and I then saves the scene as a DBO file which also creates a lightmap folder with files for use in my DBP program. I then (using DBP) need to enter some code in to the script telling DBP where to locate the newly lightmapped scene (DBO file & textures folder)..
Sample:
sync on
sync rate 60
rem load world mesh
load object "C:\Program Files (x86)\The Game Creators\Dark Basic Professional\Projects\Mine\MyGame\Scene data\ground.x",1 `load terrain object, replace with own or use original
load image "C:\Program Files (x86)\The Game Creators\Dark Basic Professional\Projects\Mine\MyGame\Scene data\ground.jpg",76 `load texture for the terrain
texture object 1,76
rotate object 1,0,180,0
scale object 1, 5000,5000,5000
Rem load building
load object "C:\Program Files (x86)\The Game Creators\Dark Basic Professional\Projects\Mine\MyGame\Scene data\building.x",2
load image "C:\Program Files (x86)\The Game Creators\Dark Basic Professional\Projects\Mine\MyGame\Scene data\Building.bmp",3
texture object 2,3
scale object 2, 150,150,150
position object 2,0,0,0
Rem load lightmap scene test
load object "C:\Users\Public\Documents\Project Files\Games Design Files\MyGame\Scene data\test area\scene.dbo",4
rem load image "C:\Users\Public\Documents\Project Files\Games Design Files\MyGame\Scene data\test area\lightmaps\universe0.png-universe14.png",5
rem texture object 4,5
scale object 4, 100,100,100
position object 4,10,0,0
rem Main
do
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)
`
cx#=camera position x() : cz#=camera position z()
Rem Control input for camera
`move forwards
If keystate(17)=1
cX# = Newxvalue(cX#,CameraAngleY#,10)
cZ# = Newzvalue(cZ#,CameraAngleY#,10)
Endif
`move backwards
If keystate(31)=1
cX# = Newxvalue(cX#,Wrapvalue(CameraAngleY#-180),10)
cZ# = Newzvalue(cZ#,Wrapvalue(CameraAngleY#-180),10)
Endif
`move left
If keystate(30)=1
cX# = Newxvalue(cX#,Wrapvalue(CameraAngleY#-90),10)
cZ# = Newzvalue(cZ#,Wrapvalue(CameraAngleY#-90),10)
Endif
`move right
If keystate(32)=1
cX# = Newxvalue(cX#,Wrapvalue(CameraAngleY#+90),10)
cZ# = Newzvalue(cZ#,Wrapvalue(CameraAngleY#+90),10)
Endif
`mouse movement
Yrotate camera CurveAngle(CameraAngleY#,OldCamAngleY#,24)
Xrotate camera CurveAngle(CameraAngleX#,OldCamAngleX#,24)
position camera cx#,1027-intersect object(1,cx#,1000,cz#,cx#,-1000,cz#),cz# `this is the main part of the code, use
`normal wsad controls with the x and z positions but intersect the terrain object with the y position
camx = camera position x (0)
camy = camera position y (0)
camz = camera position z (0)
cx#=camera position x() : cz#=camera position z()
sync
rem Debug
if keystate(41)=1
set cursor 0,0 : print "FPS: ";screen fps():print "X Position : " ,camx:print "Y Position : " , camy:print "Z Position : " , camz
endif
`
rem Update screen
sync
`
rem End loop
loop
Basically, I am trying to learn how to program a 1st person enviroment. I am lost between
Rem load lightmap scene test and
do main loop, as in what code do I put in there to get DBP to display my DBO file with textures & lightmapping!
Hope that clears up my intentions!