FlappyBird - keyup vs mouseup

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
Posts: 39
Joined: Mon Jun 01, 2015 11:38 am

FlappyBird - keyup vs mouseup

Post by antrax13 » Fri Jul 03, 2015 12:45 pm


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 https://www.udemy.com/livecode101/

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 http://phone-apps.net/FlappyBird.zip

Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: FlappyBird - keyup vs mouseup

Post by sefrojones » Fri Jul 03, 2015 4:08 pm

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.


Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”