hey I'm writing a relatively simple academic/2d game but it's eating up my processor time before the main loop is doing anything but dbSync. I'm only loading a background picture, a button, and a map image (sand.bmp). Only the background and the button are displayed when the game first starts. Here is the code that runs before the user presses a button to start code within the main loop:
void DarkGDK ( void )
{
dbSetImageColorKey ( 255, 0, 255 );
dbSyncOn ( );
dbSyncRate (20 );
if (dbCheckDisplayMode ( 1024, 768, 32 )){dbSetDisplayMode ( 1024, 768, 32 ); }
else if (dbCheckDisplayMode ( 800, 600, 32 )){dbSetDisplayMode ( 800, 600, 32 );}
dbDisableEscapeKey ( );
dbRandomize ( dbTimer ( ) );
dbLoadImage ( "rockbg.bmp", 1 ); //bg
dbSprite ( 1, 0, 0,1 );
dbLoadImage ( "start.bmp", 2 ); //start button
dbSprite ( 2,339,375,2 );
dbLoadImage ( "mapsand.bmp", 5 );// map: sand
// now we come to our main loop, we call LoopGDK so some internal
// work can be carried out by the GDK
while ( LoopGDK ( ) )
{
just these images are pushing my 3.33ghs processor to 95+ percent. I can run complex games with no problem, all but this one.
I make the same kind of games as any Chemisty major would.