Git Product home page Git Product logo

angryponies's Introduction

Angry Ponies

Angry Ponies is a mod of Angry Birds Chrome that rewrites artwork URLs to use My Little Pony: Friendship is Magic characters instead of birds and pigs.

Released to the public domain by Brenton Partridge, 2012. This is a parody of Angry Birds done under fair use.

If you'd like to contribute, let us know here!

For Non-Technical Artists

We need good artists and sound designers to make this 20% cooler! Namely, there are still lots of birds and pigs that should be ponies, saying pony lines and singing pony songs. Download any of the .png or .mp3 files listed in allurls.txt, make any changes you want (see the difference between INGAME_BIRDS.png and INGAME_BIRDS_ponies.png for an example), and create an issue with a link to your new file. We'll incorporate them as soon as possible!

Unfortunately, there's no way (yet) for you to test out your changes without having a full Node.js web app development stack. Unlike sharing kindness, this isn't an easy feat, unless you have experience with programming and the command line. If there's substantial interest in this, I'll provide a step-by-step.

For Developers

Angry Ponies runs on Node.js, with Heroku-compatible deployment scripts. To run a test server, run node server.js. When visiting chrome.angrybirds.com, the location hash can be used to set the origin of the custom server; this is done automatically if the root of the server is visited.

Technical Details

Angry Ponies uses a novel technique to intercept all asynchronous HTTP calls, including image tags. Like many HTML5 Canvas games, Angry Birds Chrome loads images to draw to a canvas by setting img.src on objects from new Image(w,h) or document.createElement('img'). While the constructors can be overloaded, there's no (reliable) information at constuction time to determine which element is which, and defining custom setters and getters for src can break the browser's drawing code. However, by overloading the constructors to add those objects to a queue, then remapping elements in the queue on the next event tick, the sources can be reset after they are first set to the original content, allowing remapping. Similarly, XmlHttpRequest.prototype.open can be remapped for JSON and sound requests (on Chrome). Then, to allow cross-origin resource sharing, we set Access-Control-Allow-Origin to * as described here.

For Firefox, Flash is used to load audio, so simply overriding XHR will not suffice. Angry Birds uses the GWT-Voices library, which we augment by overriding document.createElement('object') and document.createElement('param') to use our own SWF and allow all domains. To compile flash/CustomVoices.as, download the Flex SDK and invoke /path-to-flex-sdk/bin/mxmlc flash/CustomVoices.as -static-link-runtime-shared-libraries=true -debug=true. A compiled version is provided.

A Firefox extension can be generated automatically using the service at Extension Factory.

angryponies's People

Contributors

bpartridge avatar matchu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.