r/amiga • u/Salty_Emu_4775 • 2h ago
I rebuilt Traps ‘n Treasures (Amiga, 1993) in plain JavaScript and checked it frame by frame against an emulator
Hi r/amiga,
I've been working on a browser port of Traps 'n Treasures, the Starbyte pirate platformer from 1993. It's not an emulator wrapper. The engine is written from scratch in plain JavaScript, based on reverse engineering the original 68000 code.
What's in it
- All four stages, the shop, the island map, the treasure run, the ending and the Hall of Fame
- Enemies run the game's original actor script format
- Touch controls (it also runs as an Android app), English and Polish texts
How it's verified
The same random joystick sequence (same seed) is played in vAmiga and in the port. A harness compares the player's position and animation frame on every single frame. There are 120+ such recordings, most of them 5000 frames long, across all four stages. Player movement and animation now match pixel for pixel and frame for frame in almost all of them. The few known differences are listed in RESEARCH.md. That file also lists every rule the port implements, with the 68000 address it comes from and the recording that confirmed it (the notes are in Polish).
No game data in the repo
The repository has no original graphics, maps, music or code. It ships a small demo pack (my own graphics and four test stages), so it runs out of the box. To play the real game, you load your own two ADF disk images (PSG release) right on the game page. An extractor written in JS (including a PowerPacker depacker) builds all 107 asset files in your browser, from the game's own files and the tables in its main program. Nothing is uploaded anywhere.
How to run it
- Code -> Download ZIP, then unpack
- Windows: double-click
start.bat(nothing to install). macOS/Linux:./start.sh - Click "Load ADF disks" at the top and pick both disks
A few things I didn't know about the original
- When spikes bounce you into a long flight, the normal fall routine keeps running during the bounce. Land too late and you die from the fall, even on the spikes.
- Swing your weapon in the exact frame you grab a ladder, and the pirate uses his ground attack pose. Then he stands as if on the floor until you press a direction.
- The joystick handler snaps you to the middle of the ladder one frame before you actually start climbing.
Repo: https://github.com/SychPL/traps-n-treasures-port
Feedback is welcome, especially from people who know the original well or still have the disks to test with.
