Skip to content

Feature: APOC integration for direct Android control + frame differencing #7

@houseworthe

Description

@houseworthe

Context

From Reddit discussion with u/beefcutlery, creator of APOC (Android Phone Orchestration & Control).

Current setup uses BlueStacks + macOS shell scripts + cliclick. APOC offers a cleaner ADB-based approach for direct Android device control.

Proposed Improvements

1. Replace BlueStacks with direct Android/ADB control

  • Use APOC's TypeScript automation layer instead of shell scripts
  • Direct USB connection to Android device
  • Cleaner touch input via ADB (no cliclick coordinate hacks)

2. Frame differencing for latency reduction

From beefcutlery's suggestion:

Capture a clean baseline screenshot, then for each incoming frame compute abs(frame - baseline), threshold it to create a change mask, and run connected-components to extract dynamic regions (units, elixir, timers) for ASCII/summary rendering.

This could reduce the ~7s agent latency by sending compressed game state instead of full screenshots.

Current Architecture (for reference)

  • scripts/screenshot.sh - AppleScript + screencapture
  • scripts/tap.sh - cliclick mouse simulation
  • scripts/play_card.sh - coordinate-based card placement
  • Config in config/coordinates.json and config/gameplay.json

Open to contributors

Not actively working on this - posting for visibility. If anyone wants to take a crack at it, PRs welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions