ok I got it moving smooth and all but here is a new problem.
here is my code, see where the 2 while's are? when I add them the game dosent laod it just stops at a black screen.
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbDisableEscapeKey ( );
dbRandomize ( dbTimer ( ) );
dbLoadImage ( "backround.bmp", 1 );
dbSprite ( 1, 0, 0, 1 );
dbLoadImage("Player1.bmp",2);
dbSprite(2,10,150,2);
dbLoadImage("Player2.bmp",3);
dbSprite(3,600,150,3);
dbLoadImage("Ball.bmp",5);
dbSprite(5,300,100,5);
bool left = true;
bool right = false;
while (left)
{
dbMoveSprite(5,-0.95);
}
while (right)
{
dbMoveSprite(5,0.95);
}
dbSetImageColorKey ( 255, 0, 255 );
dbRotateSprite(5,90);
while ( LoopGDK ( ) )
{
if(dbUpKey()==1)
{
dbMoveSprite(2,5);
}
if(dbDownKey()==1)
{
dbMoveSprite(2,-5);
}
if(dbControlKey()==1)
{
dbMoveSprite(3,-5);
}
if(dbShiftKey()==1)
{
dbMoveSprite(3,5);
}
if(dbSpaceKey()==1)
{
}
if(dbSpriteCollision(5,3))
{
left = true;
right = false;
}
if(dbSpriteCollision(5,2))
{
left = false;
right = true;
}
if ( dbEscapeKey ( ) )
break;
dbSync ( );
}
return;
}
c++ = easy GDK = IMPOSSIBLE lol