This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

JamesE
JamesE presents ...

2020/1/17

Flappy Bird Game(Code does not work)

The game works perfectly, with one problem, the counter does not increase as the bird passes the pipes.

2267 views / 20 in the last 7 days

1 vote | 0 in the last 7 days

Tags: asteroids game bird random counter set if number flappy location

open in greenfoot
Your browser does not support the canvas tag.
ArcherfishArcherfish

2020/1/17

Hey James! I believe the issue is in createPipes() if pipeCounter == 100, it is reset to 0 but since FIRST_PIPE is 240, the statement if(pipeCounter >= FIRST_PIPE) is never true. Hope this helps :) Cheers, Archerfish
ArcherfishArcherfish

2020/1/17

Quick update, in the createPipes() method, simply remove the line if(pipeCounter == 100) and pipeCounter = 0, it works great now!
A new version of this scenario was uploaded on 2020-01-17 17:34:13 UTC counter works now!!!
this is the game best ever....................................................................... when i play it is not very very hard.....................................................

Want to leave a comment? You must first log in.

Who likes this?

bubbles681