Skyrunner65 wrote:I'd consider changing the name, just in case good old Dong Nguyen gets mad.( What a name.)
Be lucky that he isn't a Big Company.
Also, not everyone has 7-Zip (They should, really.), so I would consider making it a .zip .
Finally, whenever I die and it sends me back to the Title Screen, I have to reset the console for it to work(I recommend checking out my Smash and Crash code for a good example).
void setup() {
gb.begin();
gb.titleScreen(titleBitmap);
}
void initGame() {
gb.changeGame();
}
//SETUP
void setup() {
gb.begin();
initGame();
}
void initGame() {
gb.titleScreen(titleBitmap);
gb.pickRandomSeed();
gb.titleScreen(titleBitmap);
gb.pickRandomSeed(); //randomize an original random every restart.
pipesStart(); //each pipes starts at a random height.
//gb.changeGame(); //Really reset the game without pressing "C" two times...
//gb.titleScreen(F("FLAPPY BIRD clone\n \n\ ARROWS+A to fly.\n C to reset."));
//gb.battery.show = false;
player_y = ((LCDHEIGHT - GROUNDH) / 2); //the player starts at the middle of the LCD screen height minus the ground height.
gravity = 0; //gravity variable.
player_death = false;
player_animation = 0;
score = 0;
score_timer = - PLAYERX - (PLAYERW / 2);
score_units = 0;
int score_maxreached = 0;
gameover_timer = 0;
}
clement wrote:it's not a good idea to go to the game selection.
void loop(){
gb.battery.show = false;
switch(gb.menu(menu, MENULENGTH)){
case -1: //nothing selected
titlescreen();
break;
case 0: //Load Survival
gb.display.print(F(" Loading...."));
gb.pickRandomSeed();
playerx = 20;
playery = 20;
playerflip = NOFLIP;
playerxv = 2;
playeryv = 1;
playergrav = 1;
meteory = 0;
meteorx = random(0,76);
arrowx = 0;
arrowy = random(20,40);
alive = true;
play();
break;
void play(){
while(true){
if(gb.update()){
if(alive == true){
frames = frames + 1;
if(gb.collideBitmapBitmap(playerx, playery, player, meteorx, meteory, meteor) == true){
alive = false;
};
if(alive == false){
gb.display.setFont(font3x5);
gb.display.cursorX = 0;
gb.display.cursorY = 0;
gb.display.println("You died!");
......
if (gb.buttons.pressed(BTN_B)){
gb.sound.playCancel();
frames = 0;
gb.display.setFont(font5x7);
break;
break;
break;
};
};
};
};
};
clement wrote:It's not a good idea to go to the game selection.
clement wrote:It's not a good idea to go to the game selection.
Really? I have it so that you only really need to see the title screen once, and instead of a button labeled "Title Screen", there is "Change Game".
clement wrote:I would tell , if you return to the loader each time you die the player became crazy... mainly for a die and retry game.
Users browsing this forum: No registered users and 6 guests