Local RAG Right Over Fullscreen Games
It would seem, who is surprised by yet another wrapper over LLM these days?
🎮 The project GameWikiTooltip with such a user flow: you play Elden Ring or Helldivers 2, press Ctrl+Q, a transparent overlay pops up over the game. Inside — a browser with a wiki or a chatbot that answers questions about builds and mechanics, relying on a database of parsed YouTube guides.
It's worth looking at the source code not only for gaming features but also for architectural solutions:
▪️ Sane search pipeline. Not just a blind prompt to the LLM. A hybrid search is implemented: FAISS for semantics +
bm25s (fast Rust implementation) for exact lexical matching. Results are merged via Reciprocal Rank Fusion (RRF), and on top, a custom Intent Reranker is added to distinguish mechanic queries from requests to suggest a build.▪️ Deep Win32 hooks. In fullscreen games, standard library bindings fail due to input interception by the game (DirectInput/RawInput). Here, a hard interception of global shortcuts is implemented via
ctypes (RegisterHotKey) and filtering of native Windows messages directly in the Qt Event Loop.▪️ Integration of PyQt6 and asyncio. The eternal pain of desktop developers: how to make the Qt Event Loop friends with Python's asynchronicity so the UI doesn't freeze during network requests to the LLM. Here it is elegantly solved via qasync.
▪️ Offline voice recognition. To avoid typing during a fight, a local
vosk is attached, which listens to the microphone in a separate thread and drops the text into the input.An extra plus for the architecture: parsing YouTube guides, chunking, and embeddings are moved to an offline step, and at runtime the application only runs lightweight search on local vectors and sends context to Gemini Flash 2.5 Lite for final answer generation.
But if you're not interested in the source code, it can be useful in games for its intended purpose 😏
#good_opensource
Comments
0No comments yet.