如何在 Mac 上為未本地化的 Steam 獨立遊戲使用屏幕區域 OCR
Playing unlocalised Steam indie games on a Mac without alt-tabbing: screen-region OCR
這篇實用指南説明如何在 macOS 遊玩未本地化遊戲時,以屏幕區域 OCR 辨識對話文字,同時不切走遊戲焦點。流程使用 Apple Vision 本機辨識選取區域,再以浮動面板顯示翻譯;辨識在本機進行,但翻譯需要網絡連線。
Steam's indie catalogue is full of games that never get a Japanese localisation — or get one two years later. If you play on a Mac, the usual workarounds are all bad: hold your phone up to the monitor and run Google Lens, or ⌘Tab out to a browser translator and lose the fullscreen state, the audio, and the pacing.
This is a practical guide for playing unlocalised games on macOS without breaking the game's presentation: how the workaround breaks down technically, and what a screen-region OCR flow looks like in practice.
Why the obvious workarounds fail
Phone camera OCR. It works, once. Then you are holding a phone in one hand while the game wants both hands, the autofocus hunts across a dark fantasy UI, and the phone's OCR has no idea the text is in a decorative serif with drop shadows. Usable for a static menu, hopeless for dialogue that advances.
Alt-tab to a browser. Two costs: fullscreen state is lost (many games re-initialise the swap chain and stutter on return), and the dialogue box you wanted is now gone, because the game only renders it while focused. You end up screenshotting before switching, which is the same workflow with extra steps.
Copy-paste, when the game allows it. Most do not. Game engines render UI to a surface; there is no text layer to select, so ⌘C returns nothing. This is the same class of problem as an Electron app drawn on canvas.
What actually works: OCR the region, not the window
The constraint that matters is "do not take focus away from the game". Everything else follows:
- The capture must be a region the user draws, not the whole screen — full-screen OCR on a game UI mixes HUD, subtitles, and dialogue into one blob.
- Recognition must be local, because you are not going to upload frames of a game you own to a third party every 20 seconds.
- The output must be a floating panel that does not activate, so the game keeps its input focus.
On macOS, Apple Vision gives you (2) with VNRecognizeTextRequest, and NSPanel with .nonactivatingPanel gives you (3). The flow:
⌃S → drag a rectangle over the dialogue
→ CGImage (in memory only)
→ VNRecognizeTextRequest
→ text → translation
→ floating panel, game still focused
Settings that matter for game UI
let request = VNRecognizeTextRequest()
request.recognitionLevel = .accurate
request.recognitionLanguages = ["en-US"]
request.usesLanguageCorrection = false
request.minimumTextHeight = 0.01
-
usesLanguageCorrection = false: game dialogue is full of invented nouns, item names, and proper nouns. Language correction rewrites them into dictionary words, which is exactly wrong here. -
minimumTextHeightneeds an explicit value. Decorative fonts with tall ascenders and small x-height silently vanish under the default threshold. - Recognition languages ordered by what you actually read; for a Japanese player reading English dialogue, English first.
Practical tips from actual play
- Select the dialogue box, not the whole frame. HUD elements and quest markers add noise.
- Let the panel pin. Position it near the subtitle area so your eyes do not travel; the point of the whole exercise is not breaking gaze.
- Do not select over animated backgrounds. Particle effects and bloom behind text reduce accuracy noticeably; scroll the dialogue to a calmer frame if the game allows it.
- Skip stylised logos and title art. Decorative display type is where OCR fails first.
Honest limits
- Text rendered in a hand-written or heavily stylised display face can fail
- Low-contrast subtitles over bright scenes (snow, skyboxes) are unreliable
- Text smaller than roughly 10px on a 1440p frame, unless you crop tighter
- Rotated or perspective-skewed UI text (some racing/inventory layouts)
- Everything that is not text: icons, minimaps, damage numbers
Also worth stating plainly: recognition is local, translation is a network call. Offline, you get OCR and no translation — which for a single-player game with a text-heavy quest log is still sometimes enough to get unstuck.
Where to get it
Screen-region OCR flow for exactly this use case:
https://www.zipp-mac.com/solutions/mac-screenshot-ocr-screen-translate/?utm_source=devto&utm_medium=article&utm_campaign=steam_game
Distribution page (BOOTH):
https://zipp-mac.booth.pm/items/9082185
Takeaway
If a game does not localise, the fix is not "translate the game" — it is "translate the rectangle the player is looking at, without touching focus or the clipboard". Once you frame it that way, the technical requirements are obvious, and the workarounds you were using stop looking acceptable.
來源:DEV Community · dev.to