SU

sh0ckfr/universal-dear-imgui-hook

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

500 stars 0 forks Качество 55 Тренд 54

Универсальный крюк Dear ImGui для DirectX 12/11/10/9, OpenGL и Vulkan. Совместим с Windows, Linux и Steam Deck, с интегрированным MCP через NamedPipe для отладки и управления игрой.

Обзор

Наложение Dear ImGui, которое рисует ваш интерфейс внутри другого приложения, независимо от того, какой графический API он использует, и позволяет помощнику AI, такому как Claude Code, видеть и играть в игру через MCP по локальной названной трубе или гнезду Unix. API обнаруживается во время выполнения: построить один раз, ввести в любом месте. Игры под управлением Wine или Proton используют Windows DLL. - : бэкэнд выбран из первого API, который представляет кадр. Инъекция до или после игры инициализирует ее графику. - через MCP и локальную названную трубку (Windows) или разъем Unix (Linux), помощник, такой как Claude Code, видит игру, пишет игроку по ней и нажимает на ее клавиши. INSERT, или L3 + R3 на контроллере, открывает меню; F11 удаляет наложение и разгружает DLL. Ключами являются настройки в example/config.cpp. В то время как меню открыто, игра не видит ввода клавиатуры, мыши или контроллера (Windows), и контроллер XInput перемещается по меню.

Обзор (машинный перевод)

Наложение Dear ImGui, которое рисует ваш интерфейс внутри другого приложения, независимо от того, какой графический API он использует, и позволяет помощнику AI, такому как Claude Code, видеть и играть в игру через MCP по локальной названной трубе или гнезду Unix. API обнаруживается во время выполнения: построить один раз, ввести в любом месте.

| API | Windows (x86, x64) | Linux (x86-64, ARM64) | [править править код] Direct3D 9, 9Ex :white check mark: не требуется | Direct3D 10, 11, 12 | :white check mark: | НЕ ПРЕДСТАВЛЯЕТСЯ | | Vulkan | :white check mark: | :white check mark | OpenGL 3.0+ | :white check mark: (WGL) | :white check mark: (GLX, EGL)

Игры под управлением Wine или Proton используют Windows DLL.

Содержимое

  • Особенности Быстрый старт Использование: Windows, Linux, настройки, ваше меню, как библиотека Дистанционный контроль с помощью помощника AI
  • API
  • Как это работает
  • Здание
  • Испытания
  • Вклад
  • Ограничения
  • Поддержка

Разделы, отмеченные ▶, разворачиваются на клик.

Особенности

** Одна библиотека для каждого API**: бэкэнд выбран из первого API, который представляет кадр. Инъекция до или после игры инициализирует ее графику.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Universal-Dear-ImGui-Hook

A Dear ImGui overlay that draws your interface inside another application, whatever graphics API it uses, and lets an AI assistant such as Claude Code see and play the game through MCP over a local named pipe or Unix socket. The API is detected at runtime: build once, inject anywhere.

API Windows (x86, x64) Linux (x86-64, ARM64)
Direct3D 9, 9Ex :white_check_mark: NOT REQUIRED
Direct3D 10, 11, 12 :white_check_mark: NOT REQUIRED
Vulkan :white_check_mark: :white_check_mark:
OpenGL 3.0+ :white_check_mark: (WGL) :white_check_mark: (GLX, EGL)

Windows games running under Wine or Proton use the Windows DLL.

Contents

Sections marked with ▶ unfold on click.

Features

  • One library for every API: the backend is picked from the first API that presents a frame. Inject before or after the game initializes its graphics.
  • Remote control by an AI assistant: through MCP and a local named pipe (Windows) or Unix socket (Linux), an assistant such as Claude Code sees the game, writes to the player over it and presses its keys.
  • Menu input: INSERT, or L3 + R3 on a controller, opens the menu; F11 removes the overlay and unloads the DLL. The keys are settings in example/config.cpp. While the menu is open the game sees no keyboard, mouse or controller input (Windows), and an XInput controller navigates the menu.
  • No crash from the overlay (Windows, MSVC builds): an exception in the overlay, from a renderer backend or the menu code, removes it instead of taking the game down; the menu key brings it back.
  • Images and frame capture: uih::CreateTexture() turns RGBA pixels into an image for ImGui::Image(), and uih::CaptureFrame() copies what the game draws, without the overlay, on every backend.
  • Several windows: when the game presents to more than one window or swap chain, the overlay stays on one of them and follows the focus.
  • Readable on any display: the interface follows the DPI of the game window, or a fixed scale, with correct colors on sRGB and floating-point back buffers.
  • No injector needed: the DLL can be loaded as dinput8.dll, and the Linux library with LD_PRELOAD.
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "game": { "command": "python", "args": ["C:/path/to/Universal-Dear-ImGui-Hook/remote/uih_mcp.py"] } } }