I need Help by my Arduino Project

Hey Guys,
I need help with my Arduino project Flappy Bird. The project works so far that the only problem I have is that my bird is not inserted. I want to insert the bird using an ICONS and a UTFT file. The bird I have with an Imageconverter on 32x32 pixels tailored. Here is my program

#include <UTFT.h>
#include <URTouch.h>
#include <EEPROM.h>
//#include <UTFT_Buttons.h>

UTFT myGLCD(ITDB50,38,39,40,41); //Pins müssen an Display Art angepasst werden
URTouch myTouch( 6, 5, 4, 3, 2);

extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];
//extern unsigned int bird01[0x400]; // Bird Bitmap
int x, y; // Variablen für die Koordianaten wo der Display gedrückt wird

int xP = 798;
int yP = 200;
int yB = 100;
int movingRate = 3;
int fallRateInt = 0;
float fallRate = 0;
int score = 0;
int lastSpeedUpScore = 0;
int highestScore;
boolean screenPressed = false;
boolean gameStarted = false;
void setup() {
// Display Initialisierung
myGLCD.InitLCD();
myGLCD.clrScr();
myTouch.InitTouch();
myTouch.setPrecision(PREC_MEDIUM);

highestScore = EEPROM.read(0); // Liest die Höchste Punktzahl der EEPROM

initiateGame();
}
void loop() {
xP=xP-movingRate; // xP - x Position der Röhren; größe: 319 - (-51)
drawPilars(xP, yP); // Zeichnet die Röhren

// yB - y hängt ab von der Fallrate des Vogels
yB+=fallRateInt;
fallRate=fallRate+0.4; // bestimmt die Fallrate des Vogels
fallRateInt= int(fallRate);

// Überprüfen ob der Vogel es durch schafft
if(yB>=360 || yB<=0){ // oben und unten
gameOver();
}
if((xP<=213) && (xP>=13) && (yB<=yP-4)){ // obere Röhre
gameOver();
}
if((xP<=213) && (xP>=13) && (yB>=yP+120)){ // untere Röhre
gameOver();
}

// Vogel
// zeichnet den Vogel(yB);
// Nachdem das Hinderniss den Bildschirm durchflogen hat
if (xP<=-128){
xP=798; // Setzt xP zurück zu 798
yP = rand() % 200+40; // Zufallshöhe der Röhren
score++; // erhöt den Score um eins
}
//Vogel Kontrolle
if (myTouch.dataAvailable()&& !screenPressed) {
fallRate=-6; // Wenn die fallrate negative ist, springt der Vogel
screenPressed = true;
}
// Passt auf, das der Bildschrim gedrückt wird und nicht dauerthaft jemand draufdrückt
else if ( !myTouch.dataAvailable() && screenPressed){
screenPressed = false;
}

// Nach 5 Röhren, wird die Geschwindigkeit erhöht
if ((score - lastSpeedUpScore) == 5) {
lastSpeedUpScore = score;
movingRate++;
}
}
// Benutzereinstellungen
void initiateGame() {
myGLCD.clrScr();
// Hintergrundfarbe ( Blau)
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(0,0,798,478);
// Boden (Grün)
myGLCD.setColor(221,216,148);
myGLCD.fillRect(0, 430, 798, 478);
myGLCD.setColor(47,175,68);
myGLCD.fillRect(0, 410, 798, 428);
// Text
myGLCD.setColor(0, 0, 0);
myGLCD.setBackColor(221, 216, 148);
myGLCD.setFont(BigFont);
myGLCD.print("Score:",13,440);
myGLCD.setFont(BigFont);
myGLCD.print("Neumaier,Niklas", 350, 440);
myGLCD.setColor(0, 0, 0);
myGLCD.setBackColor(114, 198, 206);
myGLCD.print("Highest Score: ",13,10);
myGLCD.printNumI(highestScore, 300, 12);
myGLCD.print(">RESET<",638,10);
myGLCD.drawLine(0,46,798,46);
myGLCD.setFont(BigFont);
myGLCD.print("TAB TO START",CENTER,200);

// Zeichnet den Vogel

// Wartet bis der Bildschrim gedrückt wird
while (!gameStarted) {
if (myTouch.dataAvailable()) {
myTouch.read();
x=myTouch.getX();
y=myTouch.getY();
// Setzt den Highscore zurück
if ((x>=625) && (x<=798) &&(y>=0) && (y<=56)) {
highestScore = 0;
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(300, 0, 375, 44);
myGLCD.setColor(0, 0, 0);
myGLCD.printNumI(highestScore, 300, 10);
}
if ((x>=0) && (x<=798) &&(y>=60) && (y<=478)) {
gameStarted = true;
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(0, 0, 798, 64);
}
}
}
// Löscht den Text "TAP TO START" bevor das Spiel losgeht
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(213, 200, 588, 332);

}
// Zeichnet Hindernisse
void drawPilars(int x, int y) {
if (x>=675){
myGLCD.setColor(0, 200, 20);
myGLCD.fillRect(795, 0, x, y-1);
myGLCD.setColor(0, 0, 0);
myGLCD.drawRect(795, 0, x-1, y);
myGLCD.setColor(0, 200, 20);
myGLCD.fillRect(795, y+162, x, 406);
myGLCD.setColor(0, 0, 0);
myGLCD.drawRect(795, y+160, x-1, 408);
}
else if( x<=670) {
// Zeichnet Blauen Winkel rechts vom Hinderniss
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(x+128, 0, x+150, y);
// Zeichnet Hinderniss
myGLCD.setColor(0, 200, 20);
myGLCD.fillRect(x+123, 1, x+3, y-1);
// Zeichnet die Schattierung der Hindernisse
myGLCD.setColor(0, 0, 0);
myGLCD.drawRect(x+125, 0, x, y);
// Zeichnet Blauen Winkel links vom Hinderniss
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(x-3, 0, x-6, y);
// Bodenhinderniss
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(x+128, y+160, x+150, 408);
myGLCD.setColor(0, 200, 20);
myGLCD.fillRect(x+123, y+162, x+3, 406);
myGLCD.setColor(0, 0, 0);
myGLCD.drawRect(x+125, y+160, x, 408);
myGLCD.setColor(114, 198, 206);
myGLCD.fillRect(x-3, y+160, x-8, 408);
}
// Zeichnet den Score
myGLCD.setColor(0, 0, 0);
myGLCD.setBackColor(221, 216, 148);
myGLCD.setFont(BigFont);
myGLCD.printNumI(score, 250, 440);
}
// Zeichnet den Vogel
void drawBird(int y) {
// zeichnet der Vogel - bitmap
myGLCD.drawBitmap (50, y, 32, 32, bird01);
// Zeichnet markierungen um den Vogel herum
myGLCD.setColor(114, 198, 206);
myGLCD.fillRoundRect(50,y,85,y-6);
myGLCD.fillRoundRect(50,y+30,85,y+36);
}
//Spiel vorbei
void gameOver() {
delay(3000);
// Löscht den Bildschrim und schreibt den Text
myGLCD.clrScr();
myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(0, 0, 0);
myGLCD.setFont(BigFont);
myGLCD.print("GAME OVER", CENTER, 80);
myGLCD.print("Score:", 250, 160);
myGLCD.printNumI(score,400, 160);
myGLCD.print("Restarting...", CENTER, 240);
myGLCD.setFont(SevenSegNumFont);
myGLCD.printNumI(2,CENTER, 300);
delay(1000);
myGLCD.printNumI(1,CENTER, 300);
delay(1000);

// Schreibt die höchste Puntkzahl in die EEPROM
if (score > highestScore) {
highestScore = score;
EEPROM.write(0,highestScore);
}
// Setzt die Variablen zurück
xP=798;
yB=100;
fallRate=0;
score = 0;
lastSpeedUpScore = 0;
movingRate = 3;
gameStarted = false;
// Spiel starten von Neu
initiateGame();
}

Hope you can help me,

Peter :slight_smile:

And here is the file of the Icon

#include <avr/pgmspace.h>

const unsigned short bird01[0x400] PROGMEM ={
0x0000, 0x1314, 0x659C, 0x7E3D, 0x761D, 0x75FD, 0x75FD, 0x761D, 0x761D, 0x761D, 0x761D, 0x761D, 0x761D, 0x761D, 0x761D, 0x7E1D, // 0x0210 (528)
0x3C78, 0x6DDD, 0x6DBC, 0x6DBC, 0x6DBC, 0x75DD, 0x659C, 0x1356, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0220 (544)
0x0000, 0x09EC, 0x23B7, 0x7E3D, 0x7E3D, 0x7E1D, 0x761D, 0x761D, 0x761D, 0x761D, 0x7E1D, 0x7E1D, 0x7E1D, 0x7E1D, 0x7E3D, 0x7E5D, // 0x0230 (560)
0x2BF7, 0x6DDC, 0x6DBC, 0x6DBC, 0x6DBC, 0x6DDC, 0x75FD, 0x2BF7, 0x124F, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0240 (576)
0x0000, 0x0000, 0x12B1, 0x2BF7, 0x7E3D, 0x7E5D, 0x7E3D, 0x7E3D, 0x7E1D, 0x7E1D, 0x7E1D, 0x7E1D, 0x7E1D, 0x7E3D, 0x7E5D, 0x5D5B, // 0x0250 (592)
0x4499, 0x6DBC, 0x6D9C, 0x6D9C, 0x6DBC, 0x6DBC, 0x75DD, 0x2BF7, 0x120D, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0260 (608)
0x0000, 0x0000, 0x0000, 0x12F2, 0x23B7, 0x6DBC, 0x867E, 0x865D, 0x7E3D, 0x7E3D, 0x7E3D, 0x7E3D, 0x7E5D, 0x865D, 0x5D5B, 0x3438, // 0x0270 (624)
0x6DBC, 0x6D9C, 0x659C, 0x659C, 0x6D9C, 0x6DBC, 0x659C, 0x1375, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0280 (640)
0x0000, 0x0000, 0x0000, 0x0000, 0x09EC, 0x1376, 0x3417, 0x657B, 0x7E5D, 0x867E, 0x867E, 0x7E3D, 0x5D5B, 0x3438, 0x4CBA, 0x659C, // 0x0290 (656)
0x659C, 0x657C, 0x657C, 0x657C, 0x6D9C, 0x6DBC, 0x3458, 0x0A2D, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x02A0 (672)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x12F2, 0x23B7, 0x3C59, 0x23D7, 0x23B7, 0x2BF8, 0x3C59, 0x54FB, 0x657C, 0x657C, 0x657C, // 0x02B0 (688)
0x657C, 0x657C, 0x657C, 0x657C, 0x6DBC, 0x44BA, 0x12F3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x02C0 (704)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1313, 0x3438, 0x655C, 0x6D9C, 0x657C, 0x657C, 0x657C, 0x657C, 0x655C, 0x655C, // 0x02D0 (720)
0x657C, 0x657C, 0x659C, 0x5D5C, 0x3418, 0x12B1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x02E0 (736)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0A0C, 0x1B75, 0x3438, 0x4CDA, 0x655C, 0x657C, 0x657C, 0x657C, 0x657C, // 0x02F0 (752)
0x5D3B, 0x4CDA, 0x3438, 0x1335, 0x09AA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0300 (768)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x124E, 0x1314, 0x1377, 0x0B57, 0x0358, 0x0358, 0x0B57, // 0x0310 (784)
0x0B56, 0x12F3, 0x09AB, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0320 (800)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFD20, 0xFDE3, 0xF500, 0x51A0, // 0x0330 (816)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0340 (832)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xE500, 0xF625, 0xE500, 0x6A20, // 0x0350 (848)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0360 (864)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xD460, 0xD480, 0xE500, 0xED82, 0xF665, 0xED82, 0xE500, // 0x0370 (880)
0xDC80, 0xD480, 0xD480, 0xCC40, 0xBBE0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0380 (896)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xE521, 0xF6A5, 0xFEC6, 0xF6C5, 0xF6C5, 0xF6C5, 0xFEC5, // 0x0390 (912)
0xFEC6, 0xF685, 0xEE44, 0xDD00, 0xBC20, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x03A0 (928)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xDCC0, 0xE521, 0xE520, 0xE520, 0xE520, 0xE520, 0xE520, // 0x03B0 (944)
0xE521, 0xE521, 0xE541, 0xDCC0, 0xA380, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x03C0 (960)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x03D0 (976)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x03E0 (992)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x03F0 (1008)
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0400 (1024)
};

hope you can help me,

Peter :slight_smile: