u/HallucinatedGames

Embedding LLM Directly in Games - Crossword Puzzle Generator

Been exploring how the latest open source models can be embedded directly into games, and I'd love to hear how other folks are thinking about this.

Some of the latest models — like Gemma 4 E2B — can run entirely on-device on mobile. I used Claude Code to build a simple proof of concept: a crossword puzzle game that generates essentially infinite puzzles, fully offline, with the LLM embedded right in the app. No token costs, no cloud dependency, no network required.

The tradeoff is obvious: the model weights eat a meaningful chunk of RAM. But once you get past that, the use cases get interesting — an RPG with unique dialogue and choices each playthrough, automatic quest generation, dynamic NPC behavior, procedurally written lore, etc.

Stack:

  • Gemma 4 E2B (the model)
  • LM Studio for local inference (though you could bundle the model and executable into a standalone game)
  • Claude Code to build it
  • Cross-platform mobile framework (Claude chose this)

Original prompt I gave Claude Code:

>I want to build a mobile game that is cross platform called "Cross Word Infinite". The idea is that a user can enter any theme, and the mobile app will create a crossword puzzle for that theme using a locally hosted LLM. In this case we will use Gemma 4 E2B, which is designed to run an LLM entirely on a mobile device. The LLM will construct word puzzles from the theme and the app will display them on a board with the numbers, hints, etc. The graphics should be nice and mobile friendly. The real differentiator is that the game can create infinite crossword puzzles offline. Users should be able to save their crossword puzzles, store them, and revisit them later. I already have Gemma 4 E2B downloaded. The app will need to run it locally so include the code to run the LLM inside the application. I want to run it on Apple as well as Android. Build this application and report back when done.

Curious what others are building with embedded models — or what kinds of games you'd want to see using this approach.

u/HallucinatedGames — 11 days ago

Vibe Coded Kaiju Game

I built a Vibe Coded Kaiju game. I used Claude Code with Agent Teams (Main Building Team), Meshy AI (AI Generated 3D Asset Models), Google Lyra (Music), and ChatGPT (Some Images). I'd love to hear folks funny or interesting ideas to improve the game. I have GitHub repo where I share how I built it - the code, prompts, etc - corycowgill/Kaiju

u/HallucinatedGames — 14 days ago