Hey
Im a student from BCU univiersity in england and this year we are to create a flight/ combat simulator using the dark gdk,
doing a couple of tutorials and experimenting i have an idea of how to do various things but i am in need of your assistance.
I enclose a my code for the game so far. generally this is just the start i.e. trying to load the skybox, terrain, model, models controls will be added shortly after.
The code underneath is sound but everything doesnt appear or doesnt load in the correct order?!?
all i see is my skybox no terrain or model. By the way i am also using a .blend model for the spitfire.
Any advice, tutorials or assistance while creating this flight sim would be greatful.
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetCameraRange (1.0f, 30000.0f);
dbLoadImage ("texture.jpg", 1 );
dbLoadImage ("detail.jpg", 2 );
dbSetupTerrain ( );
dbMakeObjectTerrain ( 1 );
dbSetTerrainHeightMap ( 1, "map.bmp" );
dbSetTerrainScale ( 1, 3.0f, 0.6f, 3.0f );
dbSetTerrainLight ( 1, 1.0f, -0.25f, 0.0f, 1.0f, 1.0f, 0.78f, 0.5f );
dbSetTerrainTexture ( 1, 1, 2 );
dbBuildTerrain ( 1 );
dbLoadObject ("Spitfire.blend", 1);
dbLoadObject ("skybox.x", 2 );
dbSetObjectLight ( 2, 0 );
dbSetObjectTexture ( 2, 3, 2 );
dbScaleObject (2, 5000, 5000, 5000);
dbPositionCamera (434, 42, -517);
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
// our main loop
while ( LoopGDK ( ) )
{
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
// update the screen
dbSync ( );
Jimmy J