| Crates.io | earthbound-battle-backgrounds |
| lib.rs | earthbound-battle-backgrounds |
| version | 0.1.0 |
| created_at | 2025-12-04 22:33:16.323741+00 |
| updated_at | 2025-12-04 22:33:16.323741+00 |
| description | Emulate and render the battle backgrounds from EarthBound / Mother 2. |
| homepage | |
| repository | https://github.com/euclio/earthbound-battle-backgrounds-rs |
| max_upload_size | |
| id | 1967241 |
| size | 238,426 |
This crate emulates the battle background animations from EarthBound / Mother 2.
This crate started as a direct port of Earthbound Battle Backgrounds JS, which is in turn a port of Kraken.
use earthbound_battle_backgrounds::{Emulator, Options, SNES_WIDTH, SNES_HEIGHT};
let mut emulator = Emulator::new(Options::default());
// Obtain an RGBA pixel buffer from your windowing system.
let mut pixels: Vec<u8> = vec![0; usize::from(SNES_WIDTH * SNES_HEIGHT) * 4];
// Call every time a new frame is required.
emulator.draw_frame(&mut pixels);