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 / dbEscapeKey() messes with the frame rate.

Author
Message
Charles
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 3rd Apr 2006 22:54
When I had set the frame rate to 30 (I like 30fps), my game works fine. When I hit the escape key to get out of the game intro, the frame rate got a whole lot faster. My 3D objects were spinning like tops when they were supposed to rotate slowly.

I included a simple application to demonstrate this bug:


#include "DarkSDK.h"

void DarkSDK ( void )
{
float fAngle = 0.0f;


dbSyncOn ( );
dbSyncRate ( 30 ); // I like a frame rate of 30.
dbMakeObjectCube(1, 2.0f);

while ( LoopSDK ( ) )
{
if ( dbEscapeKey ( ) ) {
// return;
}

if(dbReturnKey())
return;

dbYRotateObject(1, fAngle);
fAngle = dbWrapValue(fAngle + 0.05);
dbText(5, 450, "Press [ESC] key to see bug.");
dbText(5, 465, "Press [RETURN] key to exit.");
dbSync ( );
}
}
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 4th Apr 2006 01:11
you need to disable the escape key, just reinalling windows so don't have anything installed yet. but it is in the help doc

Charles
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 5th Apr 2006 04:52
Ok, I'll give it a try. Thanks. I really think that it needs to be fixed as there should not even be such a function (we control that exiting in C++;

Login to post a reply

Server time is: 2024-11-19 05:36:20
Your offset time is: 2024-11-19 05:36:20