BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
Posted by Andrew Gould on 11 April 2014
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Flappy Bird in Excel VBA - Introduction
Return to the Flappy Bird in Excel VBA Tutorial index.
Download Flappy Owl (see instructions below).
With a bit of spare time on my hands this week I thought I'd have a little fun with Excel (yes, my life is sad enough that when I have spare time I spend it playing with Excel). Anyway, you may have heard of the controversy surrounding the mobile game Flappy Bird earlier this year. At one point a group of indie game developers got together in support of Flappy Bird's creator to produce a range of games inspired by the original. Nearly 800 games were created in the so-called Flappy Jam and I thought I'd see if I could do something similar in Microsoft Excel using nothing but VBA and my severely limited artistic skills.
The end result is a little rudimentary but it works! You can download different versions of the Flappy Owl workbook from the links below. If you're interested in how I made it you can follow the Flappy Owl in Excel VBA tutorial and maybe have a go for yourself. I'm also planning to make a video version of the tutorial if you prefer watching to reading. The screenshot below gives you an idea of what the game looks like:
It's somewhat crude, but it's Flappy Bird. In Excel!
As you can see, there's plenty of room for improvement! I may find time to make some of those improvements myself and, if so, I'll keep a list of the different versions on this page. If you make any improvements yourself I'd love to hear about them in the comments below.
The table below contains links to the various versions of the Flappy Owl workbook. The game will run in Excel 2007, 2010 (32-bit and 64-bit) and Excel 2013 (32-bit and 64-bit). Unfortunately, on my machine at least, performance in Excel 2007 is dreadful to the point of almost unplayable. You may experience different results with more powerful hardware.
DISCLAIMER: The Flappy Owl workbook contains VBA macros. In order to run Flappy Owl you must enable macros within Excel. Beware that macros can contain malicious code which can run automatically when you open the file which contains them. Wise Owl does not accept responsibility for any adverse effects which may be caused by enabling macros.
|1.02||Minor update to fix bug with 64-bit versions of Excel (thanks to David Goldstraw).||Flappy Owl v1.02||2014-05-19|
|1.0||Basic version with Hi and Lo-res modes.||Flappy_Owl_v1.0||2014-04-11|
What you can do with the Files
Apart from having hours of fun playing Flappy Owl, you're welcome to do pretty much whatever you want with the workbook, except sell it or claim that you made it yourself. If you want to share it with people, feel free. If you want to host the file yourself, likewise, knock yourself out. Please do link back to the original site if you do.
I haven't made any special effort to protect the workbook or the code inside it so you're welcome to poke around to see how things work although, of course, the tutorial will hopefully explain that pretty well. Try changing a few things if you don't like the way the game works, you can always download a fresh copy if you break it irrevocably.
Instructions for Playing Flappy Owl
Once you've downloaded the file you'll need to unzip it. Right-click on the file and choose the option shown below:
Choose Extract All...
On the dialog box which appears, choose a location for unzipping the files and click the Extract button.
Before opening the Flappy Owl file it's worth opening Excel first and checking your macro security settings. In Excel 2007 you can do this by clicking the Office button in the top left corner of the screen.
Click the Office button in Excel 2007.
You can then click the Excel Options button in the bottom right corner of the menu.
Click here to open the Options dialog box.
In Excel 2010 or 2013, start by clicking the File menu. You can then click the Options button near the bottom of the list on the left of the screen. This looks slightly different in each version:
|In Excel 2010...||...and in Excel 2013|
Next, click the Trust Center option on the left of the dialog box and then click the Trust Center Settings button:
|First click here,||then here.|
On the next dialog box, click the Macro Settings option on the left hand side and then choose the option shown in the diagram below:
Choose to Disable all macros with notification.
In order to run Flappy Owl you could also choose to Enable all macros, but this would put you at risk from malicious code in other workbooks that you open.
Now click OK twice to go back to Excel. You're now ready to open up the Flappy Owl workbook. If you chose the macro security setting described above you'll need to choose to enable the macros when you open the file. This will be slightly different depending on which version of Excel you're using. In Excel 2007 you'll see this message in between the menus and the worksheet:
Click the Options... button to choose what to do next.
On the dialog box that appears, choose the option shown below and then click OK.
Choose to Enable this content and then click OK.
The warning that you receive in Excel 2010 and Excel 2013 is slightly different:
In Excel 2010 and 2013 you simply need to click the Enable Content button.
You can now use the Menu sheet in the workbook to launch the game.
There are two modes for the game in V1.0. You'll see better performance from the Lo-Res version, but the Hi-Res mode is prettier. Relatively speaking.
The term "Hi-Res" is used here in the loosest possible sense. Experienced gamers should not expect to see 1080p resolution, full-screen anti-aliased, anisotropically-filtered beauty.
One easy way to improve the appearance of the Hi-Res version is to play the game in Lo-Res mode for a couple of minutes. Switching back to Hi-Res mode will magically cause that version to look incredible.