Jump to content

Hacking an existing app, noob needs help


Recommended Posts



I'm trying to modify the FlappyBird version at www.flappybird.io.

I just need to add the standard sounds of "flapping", scoring and dying, as it doesnt have any sound yet. The only versions that have sound are flash adaptations that don't suit my need. I could hack these, but as I'm in Linux, I hardly have access to a flash compiler.


Note that it's for a scientific research in Psychology, and that it won't ever be published.


To do this I thought I could just download the page and then try to hack the code until I get the expected results.


My problem is that when I download the page and run it, it shows all the HTML but the canvas doesnt load... the game itself just doesnt show up.


I guess I need some local server or something ?

Or is it just impossible because it relies on cloud-stuff I don't have access to while executing it in local (I'm just guessing, really I'm noobish in web design).


Any hints are very welcome :)

Link to comment
Share on other sites

I don't know what you downloaded exactly, just the HTML file? If that's the case, you'd need to grab the assets also. I guess you need to deminify this (try using jslint maybe) and take a look at what the game itself needs (i.e. images). 


You will need a static server to dynamically load the js file (and presumably the images, you'll have to download them individually too, or make your own). Just run one of these in the directory you want to serve and point your browser at http://localhost:<chosen port>.


Hope that's of help. Essentially the problem is that when the HTML file is served by the remote server, it uses relative paths to grab the assets it needs. When it's taken out of context, the relative paths no longer work, so you need to point the references in the HTML to wherever the new locations are.


I hope that makes some sense :)

Link to comment
Share on other sites

  • 4 weeks later...
If you saved the page using Chrome browser with CTRL+S then it has also downloaded the javascript files so that's good. I suspect you are only missing the image files.


If you try to start your downloaded html page and then look in the developer console (CTRL+Shift+J in Chrome) you'll probably see a lot of "Failed to load resource ERR_FILE_NOT_FOUND" errors. Go through them all and download each image file manually and put them in "img" folder and then it might work. So for example this is one of the images http://flappybird.io/img/background.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...