i working on something similiar to this using only files that came with darkgdk heres the code if you want to use it to base it on.
#include "DarkGDK.h"
// the main entry point for the application is this function
void mouse ( void );
void bob ( void );
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetCameraRange (0.5f, 30000);
dbLoadObject("Atomiser.x",10);
dbLoadImage("texture.jpg", 1);
dbLoadImage("detail.jpg", 2);
dbSetupTerrain ();
dbMakeObjectTerrain (1);
dbSetTerrainHeightMap (1,"Map.bmp");
dbSetTerrainScale (1,3,0.6f,3);
dbSetTerrainSplit (1,16);
dbSetTerrainTiling (1,4);
dbSetTerrainLight (1,1.0f,-0.25f,0.0f,1,1,0.78f,0.5f);
dbSetTerrainTexture (1,1,2);
dbBuildTerrain (1);
dbPositionObject(2,50,10,100);
dbSetObjectCollisionToBoxes ( 2 );
dbRotateObject(10,-90,0,0);
dbPositionObject(10,10,-15,20);
dbLockObjectOn(10);
// our main loop
while ( LoopGDK ( ) )
{
bob ( );
dbMakeMatrix(4,100,100,10,10);
// update the screen
dbSync ( );
}
// exit the program
return;
}
void bob ( void )
{
dbControlCameraUsingArrowKeys (0,0.5,1.8);
float ground_height = dbGetTerrainGroundHeight (1,dbCameraPositionX(), dbCameraPositionZ());
dbPositionCamera (dbCameraPositionX(), ground_height + 6.0f, dbCameraPositionZ());
}
void mouse ( void )
{
}
Unfortunately i can't quite figure out how to start within the terrain, if you want to get into it just run at it, pretty simple just movement and collision, also when you go at hills you as put by you "change height" so yeh.... if you can make it better (which i know you can
) please post it up
Good Luck !
"Lifes like a box of chocolates, you never know which one you get" Forest Gump
Unless you read the leaflet, thats why hes so "different"