Get from Ico-github-logo

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

  • Flappy Bird
    MATLAB replica of the viral mobile game "Flappy Bird".
  • flappybird
    System Variables:
  • View all files
4.8 | 28 ratings Rate this file 174 Downloads (last 30 days) File Size: 126 KB File ID: #45795 Version: 1.1
image thumbnail



Mingjing Zhang (view profile)


08 Mar 2014 (Updated )

MATLAB replica of the viral mobile game "Flappy Bird"

| Watch this File

File Information

Flappybird for MATLAB
Author: Mingjing Zhang

As one of the most popular games on app stores before being taken down, Flappy Bird does not need any further introduction. Now, it has come back alive, on MATLAB.

This implementation is intentionally made to replicate the user experience of the original game, with all physical dimensions of objects being identical. The gravity and 'jumping pulse' are also carefully adjusted so that they match the original as closely as possible.

*MATLAB R2014a is recommended for this game to achieve the best graphical performance

Simply execute flappybird.m. Alternatively, you can install "Flappy Bird.mlappinstal" as a MATLAB app.

Spacebar/Return/Uparrow/W/ -> Jump/Start game/Restart game;
ESC -> Quit Game.

This game app features a few technique breakthroughs that I utilize in a game for the first time. For instance, the bird sprite is represented as a SURFACE object, as opposed to an IMAGE object, so that it can easily rotate at any angle.

** If you encounter any problem, or have any suggestions / feedbacks, please drop a comment down below. **

Enjoy the endless flapping!


This file inspired Sprite Kit Framework.

MATLAB release MATLAB 8.3 (R2014a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (34)
11 Nov 2016 Jeremiah Littrice

Is there any way to change the bird into another surface image?

28 Aug 2016 ding chen

very Good

19 Feb 2016 K. Kojima

04 Feb 2016 Melanie Magdun

05 Jan 2016 K. Kojima

Nice work

26 Dec 2015 jian zhing


05 Nov 2015 Han Feng

18 Apr 2015 Rodolfo

03 Mar 2015 Dhinesh Ram K

11 Dec 2014 John Hedengren

Here is one implementation of automatic control with this Flappy Bird application.

It is surprising that a simple P-only controller can do very well.

03 Nov 2014 Tete Tevi

15 Oct 2014 Mohammad Abouali

nice. This should be selected by mathworks as featured

16 May 2014 Yu

Yu (view profile)

I like this game,I believe I can always fly.

03 Apr 2014 Moath Awawdeh

Wonderful work Mingjing Zhang :)

31 Mar 2014 Adivhaho Magoma

Nice game,but hard not to collide

Comment only
28 Mar 2014 Turner Conrad

I hate my life now. Thanks.

28 Mar 2014 Rareson Pollard

Great work! Thank you! This is a good example to learn creating small but funny games in Matlab.

25 Mar 2014 Zohar Bar-Yehuda

20 Mar 2014 mlabviet


Comment only
20 Mar 2014 dat nguyen

dat nguyen (view profile)

20 Mar 2014 Tim

Tim (view profile)

17 Mar 2014 jacky chen

15 Mar 2014 Guodong

15 Mar 2014 David Barry

Good effort!

You need a slight modification to your code if you are packaging as an app. You need to make sure that the main fuction which you package returns a figure handle so that the app removes itself from the path when you close it.

15 Mar 2014 Ghozali Hadi


@Rabih have you use the pacakage of this submission by downloading "Download Submission"?
Or I think you have problem with your directory. Because matlab couldn't load *.mat file

14 Mar 2014 Harvey Abaya

i was thinking of doing this, but kept it a fantasy. This is a work of passion and skill. Awesome Job!

14 Mar 2014 Rabih

Rabih (view profile)

it doesn't work in matlab R2012 a. I get:
Error using load
Unable to read file sprites2.mat: No such file or directory.

Error in flappybird/initVariables (line 276)
Sprites = load('sprites2.mat');

Error in flappybird (line 94)

Comment only
13 Mar 2014 WEIGUANG HU

the game is very similar with the original one on the iphone. Thank you for your efforts. And I suggested this app to my friends already.

13 Mar 2014 Darshan Pandit


10 Mar 2014 Nakk Mungofa

wow! u actually did this?? amazing! ...and funny!

10 Mar 2014 Ligong Han

Ligong Han (view profile)


Comment only
10 Mar 2014 Ligong Han

Ligong Han (view profile)

08 Mar 2014 Jason Nicholson

It is hard to believe you took the time to make this. Funny! :)

Comment only
08 Mar 2014 Jason Nicholson

Interesting! :)

Comment only
09 Oct 2014 1.1

Oct 10, 2014
* Tested with R2014b

04 Apr 2016 1.1

Updated a note clarifying that MATLAB 2014a is the best environment for this game.

04 Apr 2016 1.1

Migrated to github

04 Apr 2016 1.1

Reinserted the description deleted by system after migrating to github

Contact us