Working prototype with dev dashboard

- Created core Engine that coordinates all subsystems
- Extended API with comprehensive endpoints for dev dashboard
- Implemented pure Go vision processing (no GoCV dependency)
- Built full-featured dev dashboard with live capture viewer, region overlays, pixel inspector
- Added D2R detector with actual health/mana reading from orb regions
- Fixed resolution profile registration and region validation
- Generated synthetic test data for development
- Added dev mode support with file backend for testing
- Fixed build tag issues for cross-platform compilation

Prototype features:
 Live capture viewer with region overlays
 Real-time state detection (game state, health %, mana %)
 Pixel inspector (hover for RGB/HSV values)
 Capture stats monitoring (FPS, frame count)
 Region management with toggle visibility
 File upload for testing screenshots
 Dark theme dev-focused UI
 CORS enabled for dev convenience

Ready for: go run ./cmd/iso-bot --dev --api :8080
This commit is contained in:
Hoid 2026-02-14 10:23:31 +00:00
parent 80ba9b1b90
commit 6a9562c406
10 changed files with 1884 additions and 62 deletions

View file

@ -129,14 +129,24 @@ func ParseBackendType(s string) (BackendType, error) {
func GetDefault() *Registry {
reg := NewRegistry()
// Register platform-specific backends
reg.Register(BackendWindowWin32, NewWin32Source)
reg.Register(BackendWindowX11, NewX11Source)
reg.Register(BackendWayland, NewWaylandSource)
reg.Register(BackendVNC, NewVNCSource)
reg.Register(BackendSpice, NewSpiceSource)
reg.Register(BackendMonitor, NewMonitorSource)
// Always register these core backends that work on all platforms
reg.Register(BackendFile, NewFileSource)
// Platform-specific backends are registered via init() functions
// with appropriate build tags to avoid compilation errors
return reg
}
// init function registers platform-specific backends.
// Each platform will have its own init function with build tags.
func init() {
defaultRegistry := GetDefault()
// Register monitor backend (should work on most platforms)
if MonitorSourceAvailable() {
defaultRegistry.Register(BackendMonitor, NewMonitorSource)
}
// Other backends registered via platform-specific init() functions
}

View file

@ -0,0 +1,15 @@
// Helper functions for backends
package backends
import "runtime"
// MonitorSourceAvailable returns true if monitor capture is available on this platform.
func MonitorSourceAvailable() bool {
// Monitor capture should work on most platforms, but let's be conservative
switch runtime.GOOS {
case "windows", "linux", "darwin":
return true
default:
return false
}
}

View file

@ -97,3 +97,13 @@ func (m *Manager) Stats() Stats {
func (m *Manager) Close() error {
return m.source.Close()
}
// Source returns the underlying capture source.
func (m *Manager) Source() Source {
return m.source
}
// Size returns the source dimensions.
func (m *Manager) Size() (width, height int) {
return m.source.Size()
}