Skip to content
roguelite labsAnthony Spezzano ↗
← All work
Native

Cradle

A native overlay that uses OCR and visual parsing to interpret a game window.

Try the mechanism

Feed matching and missing observations into the presentation gate and see when the overlay changes.

The example uses synthetic inputs to isolate this behavior. It does not operate the underlying app.

The Swift overlay follows supported remote-play windows and recognizes inventory or trade states. A presentation gate waits for consecutive observations before showing or hiding its interface.

Inside the implementation

CradleOverlayCore/ScreenClassifier.swift · OverlayPresentationGate.observe excerpt
if hasState {
    matchingFrames += 1
    missingFrames = 0
    return explicitIndex || matchingFrames >= 2 ? .show : .hold
}

missingFrames += 1
matchingFrames = 0
return explicitIndex || missingFrames >= 2 ? .hide : .hold
Read the explanation →

Implementation decisions

Built with

Swift · OCR · macOS