Page 1 of 1

FlappyBird - keyup vs mouseup

Posted: Fri Jul 03, 2015 12:45 pm
by antrax13

I have started to code FlappyBird game (so I can learn) very similar game to the one (i think spaceship) that is LC using as an example in tutorial lessons.

The only difference between flappybird and spaceship game is mousedown.

- Flappy Bird needs clicks to fly up.
- Spaceship required to hold mouse button down to fly up.

Even on udemy course where they show how to code Flappy bird using LC its not working properly

Now the issue - everything is working perfectly and I love it how simple is it but I have 3 ways how to move bird up.

1. Click on the button and that will set the position of bird to fly up
2. Click anywhere on the card and bird will fly up
3. Use any keyboard button and bird will fly up

The scenario 3 works great in livecode IDE and in a standalone app.
The scenario 1 and 2 that are proper ways on touch devices are laggy. Imagine to click 5 times per second and application start to be laggy but it is ok if I am using the keyboard buttons.

Locking screen is not helpful. Please check my livecode and try to click on button really quickly and try to press buttons on keyboard very quickly you will notice keyboard is perfect but mouse click are handled not right.

I can not upload file here because its over 1MB so please feel free to download from

Re: FlappyBird - keyup vs mouseup

Posted: Fri Jul 03, 2015 4:08 pm
by sefrojones
I wrote this a while back quickly over a weekend while experimenting with using custom properties instead of variables. You might be able to pick it apart and get some insight, although maybe not. :D >>It's not exactly like flappy bird, but I think the movement you are looking for is the same. This stack has also not been tested or optimized for mobile... anyway, here it is:

Just download the source ZIP, it contains a livecode stack and assets.