Proposal: an optional Chromium content-capture backend for Linux cloud-game sessions

Open
#120 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
linux, python

Research direction

Start by reading the existing browser backend, BaseCaptureMethod and interaction contracts, and the DeviceManager platform gates described in the issue. Then clarify with maintainers which extension boundary and dependency/import changes they want before scoping implementation. The first milestone is session lifecycle, synthetic capture and input verification, and one native daily task; generic canvas updates remain out of scope until freshness can be demonstrated.

Written by the indexing model from the issue text.

Description

Would an optional browser-content backend be a suitable direction for ok-script, followed by a separate OK-WW integration?

I have an external Linux deployment that reuses OK-WW task and character logic through browser capture/input adapters. It has exercised daily activities, weekly battle replays, Garden, repeated Boss fights and Nest clearing. This is evidence for a limited environment and team, not a claim of general Linux or arbitrary-team support. Some pickup outcomes remain explicitly unconfirmed.

The current browser backend already provides useful integration points, but its capture module imports Win32/WGC, DeviceManager gates browser enumeration on Windows graphics availability, and the framework's base dependencies include Windows desktop packages. Therefore adding a capture subclass alone would not establish a working Linux installation.

Proposed scope:

  1. Agree on the installation/import boundaries needed for an optional Linux browser path while preserving Windows defaults.
  2. Implement a selectable content-capture backend through the existing BaseCaptureMethod and interaction contracts. Keep task-facing image return values unchanged. Track the content rectangle and coordinate transform explicitly, reject stale or unverified video presentations, and release held input on shutdown/disconnect.
  3. Add a separate OK-WW opt-in integration that uses the native task registry and CharFactory. Team composition should be a tested capability, not a hard-coded launch requirement.

A deployment-specific Chromium issue may warrant a separate optional compatibility mechanism: video presentation continued, but requestVideoFrameCallback-based capture took about one second. Keeping a small CDP screencast active improved complete-frame capture. Its auxiliary images were ACKed and discarded, never used for OCR. I would prefer to discuss where such a workaround belongs before proposing it as a default. The underlying Chromium cause is not fully established.

The first runtime milestone would cover session lifecycle, synthetic capture/input verification and one native daily task. Generic canvas updates would remain unsupported until freshness can be demonstrated. Wider game-task coverage, OCR fallbacks and pickup changes would be separate work.

Questions for maintainers:

  • Should this extend the browser backend selection directly, or use a different device/provider extension point?
  • Would platform-specific dependency markers/lazy backend imports be acceptable as a prerequisite, and how should this coordinate with the ongoing macOS work in ok-oldking/ok-script#93 / ok-oldking/ok-wuthering-waves#1660?
  • Should cloud-platform-specific loading/input integration live in OK-WW, a separate optional package, or another existing extension point?

The earlier MouseResetTask import fix in ok-oldking/ok-wuthering-waves#1795 has already been merged. This proposal does not resubmit it. I can prepare narrowly scoped implementation PRs after the extension boundary is agreed. Credentials, account identifiers, browser profiles, runtime logs and private screenshots would not be included.

Dominant language
Python
Stars
876
Forks
254
Avg merge
6h 52m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ok-oldking/ok-script

All issues in ok-oldking/ok-script

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.