GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Epyxx/Ancient-Cave-Live-Tracker: Live RAM tracker for Lufia II: Rise of the Sinistrals - Ancient Cave speedruns

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 

Repository files navigation

Ancient Cave Live Tracker by Epyx

Reads the game state directly from the running Snes9x process and shows party, timers, inventory, and run events in real time. Runs as its own window and simultaneously as a browser overlay for OBS - both show the same live state, nothing gets tracked or logged twice.

Requirements

  • Snes9x 1.63, 64-bit build (snes9x-x64.exe). Other versions or builds aren't detected, since the tracker attaches to this exact process name.
  • A loaded Lufia II (US) ROM.
  • Windows, since the tracker reads the Snes9x process memory via the Windows API.

There's nothing else to configure. No ROM path, no window title, no character name - the tracker figures everything out on its own as soon as Snes9x is running and a save is loaded.

It also checks that it's really Lufia II: it looks in memory for a pattern that only shows up in this exact form for a real Lufia II party. If a different game is loaded (or none yet), it just stays in the "Snes9x running - waiting for game" waiting state instead of showing anything wrong.

Quick start

Run AncientCaveTracker.exe, done. Everything's bundled into the exe, nothing needs to be installed. Order doesn't matter - Snes9x can be started before or after the tracker.

The app UI

Shows just a single status line at startup ("Waiting for Snes9x to start..." or "Snes9x running - waiting for game"). Once a valid save is detected, the rest appears:

  • Header: current floor, run timer, floor timer, status tag (IN BATTLE, RESYNCING, ENDED: <reason>), Reset Run button, and a link to the web overlay URL.
  • Party: every recruited character with HP/MP bars, level, IP%, and currently equipped items.
  • Capsule: the currently active capsule monster, if any.
  • Inventory: every item in the bag with quantity.
  • Chests / Battles / Floor splits: the latest events of the current run, in one combined panel - chests with item and color (red/blue).

The scrollbar hides itself automatically when everything fits in the window, and only shows up when there's actually something to scroll.

Reset Run

Manually ends the current run (with a confirmation dialog), saves a log for it, and resets the UI back to its starting state. Useful when Snes9x gets manually reset or restarted without the tracker catching it as a reset on its own.

Web overlay / OBS

The app automatically starts a small local web server at:

http://127.0.0.1:1337

This address can be opened in a regular browser (e.g. as a second, freely movable window for keeping an eye on the run yourself) or entered directly as an OBS Browser Source. Both show the same live state as the app UI - nothing gets tracked or logged twice. The background is transparent, meant for overlays in a stream.

The "Web Overlay: 127.0.0.1:1337" link in the app UI opens this address directly in the default browser.

Run-end detection & logs

A run starts automatically as soon as Start is pressed on the Gift Mode name-entry screen (or, as a fallback, on entering the cave, if the tracker was started later than that). It ends automatically on one of these events, and the timer pauses at that point rather than resetting to zero:

Reason (end_reason) Trigger
boss_defeated Jelly (final boss) defeated on floor 99
total_defeat Every party member at 0 HP
left_cave Left the cave normally (back to floor 0)
reset_or_disconnect Snes9x reset or connection loss detected
manual_reset "Reset Run" button clicked manually

Every run ending automatically writes a JSON log file to run_logs/ next to the exe (the folder is created automatically if needed), with a timestamp in the filename:

run_logs/run_2026-07-27_211643_reset_or_disconnect.json

Contents: end reason, total time, final floor, final party (name/level/HP), all floor splits, all chests opened (item, color, floor, timestamp), and all battles (floor, duration, monsters incl. defeated/fled). Example:

{
  "end_reason": "reset_or_disconnect",
  "saved_at": "2026-07-27T21:16:43",
  "total_elapsed_seconds": 50.51,
  "total_elapsed": "00:00:50.51",
  "final_floor": 1,
  "party": [],
  "floor_splits": [],
  "chest_events": [
    { "item_id": 169, "item_name": "Frock", "floor": 1, "elapsed_seconds": 37.19, "is_blue": false }
  ],
  "battle_events": [
    {
      "floor": 1, "duration_seconds": 4.25, "elapsed_seconds": 50.51,
      "monsters": [
        { "name": "Mushroom", "defeated": false },
        { "name": "Spider", "defeated": false }
      ]
    }
  ]
}

Running from source

Requires Python 3.13 and the pymem package:

pip install pymem

Entry points:

  • python app_gui.py - native app UI, identical to the exe.
  • python main.py - simple console output (debug / first-milestone tool).

Rebuilding the exe

pyinstaller --onefile --windowed --icon=Master.ico --version-file=version_info.txt --add-data "game_data.json;." --add-data "Master.ico;." --add-data "Master.png;." --add-data "overlay.html;." --name "AncientCaveTracker" app_gui.py

The result is a single AncientCaveTracker.exe with all data bundled in.

Troubleshooting

  • "Waiting for Snes9x to start..." - Snes9x isn't running yet (or not as snes9x-x64.exe).
  • "Snes9x running - waiting for game" - Snes9x is running, but no valid save is loaded yet.
  • "RESYNCING" - briefly after a SNES reset, until memory settles back down; normally clears up on its own within a few seconds.
  • If the app accidentally ends up running twice (two instances at once), only one of them can bind port 1337 - the "Web Overlay" link then just opens whichever instance started first.

About

Live RAM tracker for Lufia II: Rise of the Sinistrals - Ancient Cave speedruns

Topics

live-trackerlufia2memory-readingobs-overlaypythonram-trackerretro-gamingrpgsnessnes9xspeedrunspeedrun-toolspeedrunning

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.