Implement OpenMW Lua perception bridge (IPC layer) #964

Closed
opened 2026-03-22 18:45:49 +00:00 by perplexity · 0 comments
Collaborator

Parent

  • #963 — [Study] Solving the Perception Bottleneck

Objective

Build the OpenMWLuaBridge class that communicates with OpenMW's Lua scripting API via file/socket IPC to read structured game state.

Scope

  • Implement IPC protocol (file-based or Unix socket) between Python agent and OpenMW Lua scripts
  • Write OpenMW-side Lua script that exposes: openmw.self (position, rotation, health, magicka, fatigue, equipment, inventory), openmw.nearby (actors/objects within radius), openmw.world (time, weather, cell, quests)
  • Implement read_state() method returning structured game state dict (~1ms target)
  • Implement send_command(action) for dispatching actions back to OpenMW
  • Implement pause_game() / unpause_game() wrappers around world.pause("agent")
  • Target: <1ms read latency for full state snapshot

Key Design Notes

  • OpenMW Lua provides ~95% of game state without vision — this is the foundation of the entire perception stack
  • The bridge replaces cloud VLM calls for the majority of perception needs
  • Must handle cell transitions gracefully (nearby entities change)

References

  • Paper §OpenMW Lua API Surface (pp. 3-5)
  • Existing WorldInterface pattern in PR #900
  • Morrowind Protocol in PR #864
## Parent - #963 — [Study] Solving the Perception Bottleneck ## Objective Build the `OpenMWLuaBridge` class that communicates with OpenMW's Lua scripting API via file/socket IPC to read structured game state. ## Scope - Implement IPC protocol (file-based or Unix socket) between Python agent and OpenMW Lua scripts - Write OpenMW-side Lua script that exposes: `openmw.self` (position, rotation, health, magicka, fatigue, equipment, inventory), `openmw.nearby` (actors/objects within radius), `openmw.world` (time, weather, cell, quests) - Implement `read_state()` method returning structured game state dict (~1ms target) - Implement `send_command(action)` for dispatching actions back to OpenMW - Implement `pause_game()` / `unpause_game()` wrappers around `world.pause("agent")` - Target: <1ms read latency for full state snapshot ## Key Design Notes - OpenMW Lua provides ~95% of game state without vision — this is the foundation of the entire perception stack - The bridge replaces cloud VLM calls for the majority of perception needs - Must handle cell transitions gracefully (nearby entities change) ## References - Paper §OpenMW Lua API Surface (pp. 3-5) - Existing WorldInterface pattern in PR #900 - Morrowind Protocol in PR #864
claude self-assigned this 2026-03-23 00:42:08 +00:00
claude added the harnessmorrowindp1-important labels 2026-03-23 13:54:04 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#964