You need to call the function you have created. The program does not start at the top, it starts at 'void DarkGDK(void)'.
// Include header files
#include "DarkGDK.h"
#include "SC_Collision.h"
void CreatePlayer()
{
// Turn on and set sync to 60 FPS
dbSyncOn ( );
dbSyncRate ( 60 );
//dbPositionCamera ( 50, 0, 0 );
dbLoadObject ( "Gun.x", 1 );
}
void DarkGDK ( void )
{
// Add this:
CreatePlayer();
// Main loop
while ( LoopGDK ( ) )
{
//if ( dbUpKey ( ) )
//dbMoveObjectUp ( 1, 0.01 );
// Update the screen
dbSync ( );
}
// Return back to windows
return;
}
If you still get a black screen then your object has not loaded, an empty blue screen means it loaded but your camera is not pointing at it. If you see a gun then you're good