Flappy Bird Clone > Week 3 Progress

April 21, 2020

Key Changes

  • Back to one player game
  • Introductory splash screen
  • Sound effects: Annoying on pupose! :-)
  • Keeps track of current and highscore (with indicators)
  • Tweaked visual cues and transitions

Current State

pipe.js - Colour Transition (x-axis)

1
2
3
4
5
6
    show() {
        //draw the top and bottom of the rectangle (with spacing)
        fill(255 * (this.x / width), 255 * (this.x / width), 255 * (this.x / width));
        rect(this.x, 0, this.w, this.top);
        rect(this.x, this.bottom, this.w, height - this.bottom);
    }

bird.js - Colour Transition (y-axis)

1
2
3
4
5
    show() {
        //change colour of bird based on vertical location
        fill((255 * (this.y / height)), 0, 255 - (255 * (this.y / height)));
        ellipse(this.x, this.y, this.width, this.height);
    }

sketch.js - New Record After 1st Round

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function showScores() {
    if (score > maxScore) {
        maxScore = score;

        if (!firstPlayThrough) {
            bellSound.play();
            textSize(20);
            fill(255, 0, 0);
            text("New Record!", 160, 275);
        }
    }

    textSize(32);
    fill(0, 0, 255);
    text('current: ' + score, 242, 25);

    if (!firstPlayThrough) {
        textSize(32);
        fill(255, 0, 0);
        text('record: ' + maxScore, 251, 60);
    }
}

What Could Be Next?

  • Ability to mute sound effects (e.g. s = toggle)
  • Difficulty settings (toggle or progressively more challenging)
  • Local multiplayer
  • Network multiplayer: socket.io
  • Update from geometric shapes to graphical icons