Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Loading dbo, And Driectx files lighting

Author
Message
3dmasters
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location:
Posted: 26th May 2010 11:50
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!!!

Attachments

Login to view attachments
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 26th May 2010 12:35
For the dbo files, I think you have to light it in 3DWS for it to show properly. I have never tried using x files much so can't help there.
Also, there is a loader that pixel perfect made for 3DWS files, if you have no luck with dbo and x files then it might be worth a shot.
3DWS Loader

Login to post a reply

Server time is: 2024-07-07 01:08:27
Your offset time is: 2024-07-07 01:08:27