Hi I have been using darkGDK for a few days and created a simple game. I want to allow text printed in the screen to keep scores but my background sits above and dose not show any text.
any help would be great, this has been bugging me for some time
#include "darkGDK.h"
#include "player1.h"
#include "player2.h"
#include "ball.h"
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
dbDisableEscapeKey();
dbSetImageColorKey(255,255,255);
dbLoadImage("background.bmp",1);
dbLoadImage("dave.bmp",2);
dbLoadImage("lsdt.bmp",3);
dbLoadImage("topbottomline.bmp",4);
dbLoadImage("leftrightline.bmp",5);
dbPasteImage (1,10,20);
//background
dbSprite(2,50,220,2); //player1
dbSprite(3,590,220,2); //player2
dbSprite(10,0,0,4);
dbSprite(11,0,0,5);
dbSprite(12,635,0,5);
dbSprite(13,0,475,4);
player1 player1;
player2 player2;
ball ball;
while(LoopGDK())
{
dbText ( 10, 20, "text" );
player1.movement();
player1.hitball();
player2.movement();
player2.hitball();
ball.reset();
ball.movement();
ball.goal_check();
ball.collision();
if(dbEscapeKey() == 1)
{
break;
}
dbSync();
}
for (int i = 1; i < 14; i++)
{
dbDeleteImage(i);
dbDeleteSprite(i);
}
return;
}