// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbBackdropOff ( ); // switch backdrop off - no need to clear screen
float objX, objZ, cPosX, cPosZ, aY, cZ, cX;
int a;
dbSetCameraRange ( 0, 30000 );
//ground
dbMakeObjectPlain ( 1, 5000, 5000 );
dbXRotateObject ( 1, 90 );
dbPositionObject ( 1, 2500, 0, 2500 );
// create our skybox
dbLoadObject ( "hr.x", 200 ); // load the skybox model
dbSetObjectLight ( 200, 0 ); // turn lighting off
dbSetObjectTexture ( 200, 3, 1 ); // set texture properties
dbPositionObject ( 200, 1000, 2000, 4000 ); // position the skybox
dbScaleObject ( 200, 30000, 30000, 30000 ); // and finally scale
//////////
//player
dbMakeObjectCube ( 2, 60);
dbPositionObject ( 2, 0, 10, 0 );
//////////
//////load castle
dbLoadObject ( "Castle_1/Castle_1.x",5 );
dbScaleObject ( 5, 1200, 1200, 1200 );
dbPositionObject ( 5, 2000, 0, 1500 );
dbLoadObject ("Old House 1.x",6 );
dbPositionObject ( 6, 1450, 0, 2270 );
dbScaleObject ( 6, 2600, 2600, 2600 );
dbLoadObject ( "Armour_ Shop.x",7 );
dbScaleObject ( 7, 1000, 1000, 1000 );
dbPositionObject ( 7, 2250, 0, 1250 );
dbYRotateObject ( 7, -90 );
dbLoadObject ( "H-Knight-Static.x",8 );
dbPositionObject ( 8, 3140, 0, 760 );
dbScaleObject ( 8, 8000, 8000, 8000 );
dbYRotateObject ( 8, 70 );
// our main loop
while ( LoopGDK ( ) )
{
aY = dbObjectAngleY (2);
// move the camera forwards
if ( dbUpKey ( ) )
{
dbMoveObject ( 2, 6);
}
if ( dbLeftKey ( ) )
{
dbYRotateObject ( 2, ( aY - 4 ) );
}
if ( dbRightKey () )
{
dbYRotateObject ( 2, ( aY + 4 ) );
}
objX = dbObjectPositionX (2);
objZ = dbObjectPositionZ (2);
cZ = dbNewZValue(objZ, aY-180, 220);
cX = dbNewXValue(objX, aY-180, 220);
dbPositionCamera ( 0, cX, 80, cZ );
dbPointCamera ( objX, 50, objZ );
dbText(50,110,dbStr(dbCameraPositionX (0)));
dbText(50,120,dbStr(dbCameraPositionY (0)));
dbText(50,130,dbStr(dbCameraPositionZ (0)));
dbText (74, 140, dbStr(dbScreenFPS ()));
dbText ( 0, 110, "cPosX=" );
dbText ( 0, 120, "cPosY=" );
dbText ( 0, 130, "cPosZ=" );
dbText ( 0, 140, "ScreenFPS=" );
// move the camera backwards
// update the screen
dbSync ( );
}
// return back to windows
return;
}
Iv been playing around with some code and when i load the sky box the models get all glitchy and the faces scatter...any help?

http://www.freewebs.com/zornoxstudios/
Learning C++ thanks DGDK