Hello all,
I am have trouble with my scene files. i am trying to load a map i make in 3dWorld studio if i try and load the dbo file it come up all grey. So i saved the map as a Directx file format and now the level shows up but i can't see to get enought light in the game.
Can someone take a look the files i am uploading and look at the code and see what i doing wrong. I need the scene to light up and can not seem to get that to work.
Here is my code;
#include "dinput.h"
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbLoadObject ( "comeondown.x", 1 );
dbLoopObject ( 1, 1, 101);
dbSetObjectSpeed ( 1, 40 );
dbAutoCamOff();
dbSetCameraRange ( 1, 10000 );
dbAutoCamOff();
dbLoadObject ( "room.x",1 );
dbSetObjectLight ( 1, 10);
dbPositionCamera ( 0,40, 0 );
// camera variables
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
while ( LoopGDK ( ) )
{
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
// rotate camera
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
if ( dbKeyState ( DIK_W ) )
{
dbMoveCamera ( 4 );
}
if ( dbKeyState ( DIK_S ) )
{
dbMoveCamera ( -4 );
}
if ( dbKeyState ( DIK_A ) )
{
dbMoveCameraLeft ( 0, 4.0f );
}
else if ( dbKeyState ( DIK_D ) )
{
dbMoveCameraRight ( 0, 4.0f );
}
dbSync ( );
}
return;
}
I have included the 3DW Studio file to try it out yourself if needed.
Thank you in advance.
Leroy
Here i am!!!