# I need help with my flappy bird game (second round not working)

**URL:** <https://discourse.processing.org/t/i-need-help-with-my-flappy-bird-game-second-round-not-working/44328>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [April 22, 2024, 3:32pm UTC](https://discourse.processing.org/t/i-need-help-with-my-flappy-bird-game-second-round-not-working/44328 "2024-04-22T15:32:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sterling](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@Sterling](https://discourse.processing.org/u/Sterling)\
**Post date:** [April 22, 2024, 3:32pm UTC](https://discourse.processing.org/t/i-need-help-with-my-flappy-bird-game-second-round-not-working/44328/1 "2024-04-22T15:32:28Z")

</div>

Hi, so I’m very new to p5.js and I’m trying to make a basic flappy bird game with two levels. This is pretty much my first project in p5.

So my first level is working how I want it to, if the player survives until the timer runs out (15 seconds without losing all 5 lives) I have a working win screen. But I want the player to be able to click anywhere and the second level should start, but that isn’t working.

I’ve tried console logging and I think the second round function is being called properly, so I’m not sure where to go from here. Here is my code:

[https://codepen.io/sterling/pen/MWRZvjz](https://codepen.io/sterling/pen/MWRZvjz)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [April 22, 2024, 4:17pm UTC](https://discourse.processing.org/t/i-need-help-with-my-flappy-bird-game-second-round-not-working/44328/2 "2024-04-22T16:17:03Z")

</div>

I guess you need to reset some variables

such as

```auto
    this.y = height/2;
    this.x = 64;

```

---

<div class="post-metadata">

**Author:** ![Sterling](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@Sterling](https://discourse.processing.org/u/Sterling)\
**Post date:** [April 22, 2024, 8:21pm UTC](https://discourse.processing.org/t/i-need-help-with-my-flappy-bird-game-second-round-not-working/44328/3 "2024-04-22T20:21:56Z")

</div>

What do you mean by reset?

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [April 23, 2024, 5:45am UTC](https://discourse.processing.org/t/i-need-help-with-my-flappy-bird-game-second-round-not-working/44328/4 "2024-04-23T05:45:16Z")

</div>

Just set the values of crucial variables back to the initial values
