iso-bot/CLAUDE.md

2.1 KiB

CLAUDE.md — iso-bot project context

What is this?

A screen-reading bot engine for isometric games. First target: Diablo II: Resurrected (D2R). No memory injection, no hooking — purely screen capture + computer vision + input simulation.

Tech Stack

  • Go 1.23+ — core engine
  • Pure Go image processing (no GoCV yet) — vision pipeline
  • net/http + WebSocket — API server
  • SolidJS + TypeScript — web dashboard (planned, currently vanilla HTML)

Project Structure

cmd/iso-bot/       Entry point. --dev flag for development mode
cmd/debug/         Debug tool for analyzing screenshots
pkg/engine/        Core engine (capture, vision, input, state, safety, loot, resolution)
pkg/plugin/        Game plugin interfaces
pkg/api/           REST + WebSocket API
plugins/d2r/       Diablo II: Resurrected plugin
web/dev/           Dev dashboard (single HTML file)
config/            YAML configs
testdata/          Test screenshots

Build & Run

go build ./cmd/iso-bot
./iso-bot --dev --api :8080                    # Uses testdata/d2r_1080p.png
./iso-bot --dev --api :8080 --capture-file path/to/screenshot.png
go run ./cmd/debug                              # Analyze screenshot regions

Key Architecture Decisions

  • Plugin system: pkg/plugin/plugin.go defines interfaces. Games implement them.
  • Resolution profiles: Each game registers pixel-exact regions per resolution in pkg/engine/resolution/
  • Modular capture: pkg/engine/capture/backends/ — file, window, VNC, Spice, Wayland, etc.
  • Declarative loot filter: YAML rules in plugins/d2r/loot/default.yaml

Git

git add -A && git commit -m "message"
GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no" git push origin main

Important Notes

  • Always run go build ./cmd/iso-bot after changes to verify compilation
  • The testdata/d2r_1080p.png is a REAL D2R screenshot — use it for testing
  • HSV ranges in plugins/d2r/config.go are calibrated for real screenshots
  • D2R uses circular orbs for health/mana, not horizontal bars
  • Region coordinates are for 1920x1080 resolution