Flappy Bird not working

I need to do a flappy bird game but its not working like how i want i tried so many things... The code and the game shouldnt be that complicated. The important thing is that the game works, please help me!
Flappy_Bird23.aia (245.4 KB)

WelcomeChips.

Did you use the the tutorial below as the basis of your 'Flappy Bird'. The tutorial shows how you could do lots of things Perhaps reviewing the tutorial will answer your question(s).

The last time I looked at this the Flappy Copter worked for me OK.

https://imagnity.com/android/flappy-copter-create-a-game-like-flappy-bird-from-scratch-using-app-inventor/

When you init a global variable to the result of taking a random number, that happens only at program startup, and it just sits there, never changing until you change it elsewhere in the program by asking for a new random number.

The init value is not policy or a promise.
It's just a starting value at best.

So go through your code, and code new calls to that random number block in all the places where you need a new random number.

If those calls will be very similar, like sharing a range, use a value function to call the random block, and call the value function.


Flappy_Bird23 (1).aia (245.3 KB)

This will give you fresh randomness.

I notice you are using hard wired x and y numbers, but your Project Properties are set to Responsive, which will give you different x and y ranges depending on the run time device, usually much bigger numbers.

Either switch to Fixed or calculate x and y in proportion to Canvas Width and Height respectively.

1 Like

I saw the tutorial but the code is very complicated i believe that it can be easier like my code and i also need to be able to explain the code to the teacher.

Ohhh thank youu!
I tried to change the height and width while i opened the app to see it better, it should be good now. But i still dont understand why it doesnt have the gap. When i want to code in javascript i would do it like this, thats why i dont understand why it doenst work.

I changed the height of the canvas to 800 pixels und the width to 1080p