GitXplorerGitXplorer
g

Earthbound-Battle-Backgrounds

public
42 stars
7 forks
1 issues

Commits

List of commits on branch master.
Unverified
6b8f931effe0063b00d539f93b79b8262ad075b9

Update README.md

ggjtorikian committed 11 years ago
Unverified
60aead1a22108f1440961c4a911d5f53bca86bac

Update release

ggjtorikian committed 11 years ago
Unverified
068ede131ffc9595dd592adff1c97a63e08c79be

Adjust local project settings

ggjtorikian committed 11 years ago
Unverified
6df88965e1e14964365db835a63cf77053f0959a

Trash custom help page and link to the GitHub README

ggjtorikian committed 11 years ago
Unverified
c2f7a23f38b5e519a94a7aefb5de03eb3b771dc3

Ignore settings

ggjtorikian committed 12 years ago
Unverified
c52973edffddba9d05670f8544ce9897f0b58572

Add LICENSE file via addalicense.com

ggjtorikian committed 11 years ago

README

The README file for this repository.

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: http://gjtorikian.github.io/Earthbound-Battle-Backgrounds-JS/samples.

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 )

where:

  • 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.

Building

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

License

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 http://www.gnu.org/licenses.

Donations

This app is available on the Android Market: https://market.android.com/details?id=com.miadzin.livewallpaper.earthbound&feature=search_result.

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

Credits

I am entirely indebted to Mr. Accident of forum.starmen.net 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.

Discredits

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