This is a live wallpaper for Android 2.1+ that shows the battle background animations from Earthbound (Mother 2).
Clone or download
Latest commit 6b8f931 Jan 6, 2014

The Earthbound Battle Background live wallpaper is exactly what its name implies: a live wallpaper for Android 2.1 (or higher) that shows the battle backgrounds from the SNES RPG Earthbound.

Every battle background is composed of two layers, each with 326 possible styles (including "blank"). Thus, there are 326 * 326 = 106,276 possible different background combinations. Obviously, this many don't exist in the game--they only potentially exist.

It's pretty damn hard to find out which battle backgrounds correspond to which enemies. You can review the list of enemies matched with known battle backgrounds to try and get your favorite on the Suggested Layers option. If you discover a new one, please, email me and I'll add it to the list, giving you full credit! You can find a COMPLETE list of potential battle backgrounds by going here:

How it Works

The data for each of the 326 styles are bundled within the app. Tiles are constructed from various memory addresses in Earthbound game data. To create the distortion effect, the following function is used:

Offset (y, t) = A sin ( F*y + S*t )


  • y is the vertical coordinate being transformed
  • t is time that's elapsed
  • A is the amplitude
  • F is the frequency
  • S is the speed or frameskip of the transformation

Offest refers to the y direction of the shift at a given time t.

There are also three types of distortions that use the result of the Offset function:

  • Horizontal translations, where each line is shifted left by the given number of pixels
  • Horizontal interlaced translations, where every other line is shifted right by the given number of pixels
  • Vertical compression translations, where each line is shifted up or down by the given number of pixels

Different backgrounds use different distortion effects.


First, make sure you call ndk-build in the root directory. Then, just run the Android application through Eclipse.


This app is in no way endorsed or affiliated by Nintendo, Ape, HAL Laboratory, Shigesato Itoi, e.t.c. It's licensed under the GPL License, Version 3. You may obtain a copy of the License at


This app is available on the Android Market:

If this code inspires or helps you at all, please feel free to buy it from the market. Thank you!


I am entirely indebted to Mr. Accident of for the original battle background generation code, which was a C# project that uses the battle backgrounds as Windows screensavers. He also provided me with help along the way, and as far as I'm aware, he discovered the math behind it all, including the entire Offset function calculation. This port would be nothing without him.

Additionally, everyone who worked on PK Hack or was even associated with the project. It's incredible to witness such a powerful community of fans who have turned a wonderful game inside-out over and over again.

And thank you to the people on StackOverflow and the NDK Group who answered my repetitive questions with patience and clarity.


Java, for still not having the concept of unsigned types. You made my app difficult.