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 / Uni student using gdk for first time

Author
Message
jj882
13
Years of Service
User Offline
Joined: 6th Dec 2010
Location: Bham, UK
Posted: 6th Dec 2010 12:29
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
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 6th Dec 2010 13:59
Ok, please use code tags in your posts. {code} {/code}, change {} with [].

So, you can't load .blend files directly into DarkGDK! The formats supported are .x, .3ds, .dbo and .md2 .

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 6th Dec 2010 14:23
I'm at University of Birmingham - small world. This a first year project?

jj882
13
Years of Service
User Offline
Joined: 6th Dec 2010
Location: Bham, UK
Posted: 6th Dec 2010 16:37
apologies, new here so didnt realise pauli.

so are there any tutorials or any sources that would help when creating a flight simulator as i havent seen many things advising on how to go about it or what could try?

@michael p
yeh im at BCU @millenium point and this is a second year project. the first year was using c# in xna and flash but this year they have decided to use the dark gdk and c++. Also using the unity engine aswell for another game project.

Jimmy J

Login to post a reply

Server time is: 2024-09-28 14:09:46
Your offset time is: 2024-09-28 14:09:46