Back to articles
AIMC — Infinite Games: AI creates never-ending adventures in Minecraft

Infinite Games: How AI Creates Never-Ending Adventures in Minecraft for My Kids

· May 2026 · Jacint Gauxachs Marin

"Dad, the NPCs talk to me in Catalan and they know my name. Is this magic?" — No, son. It's 4 Docker containers, an LLM and 279 lines of dialogue generated at 3 AM.

Three months ago I started building a Minecraft server for my kids. The idea was simple: a medieval world where they could play together. But somewhere between configuring the first NPC and seeing their faces when that NPC spoke in Catalan, the project became something else. It became a game with no ending —literally— because every night, while they sleep, an AI reviews what they've done, generates new adventures, new dialogues, new quests, and when they wake up in the morning, the world has changed.

This article is the full technical walkthrough of AIMC (AI Minecraft): the architecture, the decisions, the failures, and why I believe projects like this represent something bigger than a Minecraft server. It's a demonstration that generative AI isn't only for corporate dashboards —it's for getting your eight-year-old to practice reading comprehension in his native language without realizing he's learning.

The vision: a game that evolves while you sleep

Vanilla Minecraft has a problem every parent knows: after two weeks, the kids drop it. Not because the game is bad, but because it's static. You build a house, kill the Ender Dragon, and that's it. No emergent narrative. No surprises. The world doesn't need you.

The question I asked myself was: what if the world did need you? What if every time you logged in there was something new? A merchant who arrived with an urgent commission. A rumor about a cave to the north where a dark wizard is amassing power. A blacksmith who needs rare materials and offers an enchanted sword in return. Not a random dice-rolled event —a coherent story, one that remembers what you did yesterday, that reacts to your decisions.

That's the vision behind AIMC. And it's not theoretical: it's been running for several weeks.

Aerial view of the medieval city of Apex, built with schematics and FAWE
Aerial view of Apex: the medieval city where the adventure unfolds. Walls, castle, cathedral, central square, stables — all built with real schematics pasted via FAWE.

The architecture: four services, one brain

AIMC runs as a Docker Compose stack with four services that talk to each other:

services:
  postgres:       # Persistent state — adventures, quests, players
  ai-director:    # Brain — FastAPI + Claude + TTS pipeline
  paper:          # Minecraft server — Paper 1.21.4 + bridge plugin
  cdn:            # nginx — resource packs + audio for clients

The flow is deliberately simple. The player interacts with an NPC in-game. The bridge plugin (Java, embedded Javalin HTTP) intercepts that click and sends it to the AI Director (Python, FastAPI). The Director queries the player's state in PostgreSQL, decides what dialogue to show, generates the response if needed via Claude, synthesizes audio via Edge TTS, and returns the text + sound command to the bridge. The bridge displays the dialogue in the game chat and plays the NPC's voice. All in under two seconds.

Paper 1.21.4

Optimized Minecraft server. Build 232 pinned (Citizens breaks on later builds). Port 25566 game + 8765 HTTP bridge.

AI Director (FastAPI)

Python with uv. Anthropic SDK, edge-tts, ffmpeg, SQLAlchemy 2 async, httpx. Port 8000. The system's brain.

PostgreSQL 16

7 Alembic migrations. Tables: adventures, world_bibles, deployments, player_quest_status, dialogue_trees.

CDN (nginx)

Serves resource packs + schematics from the shared aimc-audio volume. Clients download audio from here.

The bridge plugin: Java that speaks HTTP

The bridge between Minecraft and the AI is a Java plugin with Javalin 6.3 embedded, exposing a REST API. It's not a client mod —it's pure server-side. The endpoints cover everything the AI needs to operate on the world:

# Main bridge routes (AIMC v0.6.0)
/health              # Heartbeat
/cmd                 # Execute MC commands (configurable allowlist)
/state               # Player position + inventory
/npc/spawn           # Create NPC with skin, role, position
/structure/paste-schematic  # Paste .schematic via FAWE
/world/fill-region   # Fill region with a block
/world/prepare-stage # Prepare flat canvas for building
/adventure/deploy    # Deploy complete adventure (NPCs + dialogues + quests)
/chest/place         # Place chest with loot
/mob/spawn           # Spawn mobs with NBT (villager profession, etc.)

The decision to build an HTTP bridge instead of a monolithic plugin was deliberate: the AI Director is Python, and I want to iterate on AI logic without recompiling Java. The bridge is a thin adapter that translates high-level intentions ("place a blacksmith NPC here") into Bukkit commands. The intelligence lives outside the game.

113 NPCs that speak Catalan

My kids speak Catalan. It's their mother tongue, the language they use at school, the one they speak with their friends. But almost all the digital content they consume —games, YouTube, series— is in Spanish or English. Catalan is relegated to homework.

AIMC inverts that equation. Every NPC speaks Catalan. Every line of dialogue, every quest, every item description is in Catalan. And not just text: the NPCs have voices.

The TTS pipeline

The pipeline is: Story Bible (Claude generates narrative) → Dialogue Tree (structured into nodes with conditions) → Edge TTS (synthesizes audio) → Resource Pack (packages OGG Vorbis) → CDN (serves to client).

The voices are ca-ES-EnricNeural for male characters and ca-ES-JoanaNeural for female —the Catalan voices from Microsoft Edge TTS, free and surprisingly natural. The audio is converted to OGG Vorbis mono 44.1kHz with ffmpeg (Minecraft's native format) and packaged in a resource pack that the client downloads automatically on connection.

The result is that when a child clicks on "Mossèn Llorenç" in the Apex church, the priest says out loud, in Catalan: "Benvingut, aventurer. L'església guarda secrets antics que potser podrien ajudar-te en la teva missió." And the text appears in the chat for them to read.

Listen to the NPCs

Each NPC has its own voice generated by Edge TTS in Catalan. Here are some real in-game greetings — 599 audio files in total:

Lord d'Apex

The feudal lord of the city

Pare Bernat

The church priest

Mestre Pere

The tower scholar

Joan el Ferrer

The village blacksmith

Adela del Mercat

The market vendor

Marc l'Aprenent

The young student

The educational angle. Every quest requires reading Catalan text to advance. The "Diari de Missions" (journal) is a written book inside the game that the player must consult. Quests include clues that require real reading comprehension. And since the AI Director generates content via Claude, I can inject pedagogical content —math puzzles, historical facts about medieval Catalonia, new vocabulary— simply by adjusting the Director's prompt. Without touching code.

Characters with personality

NPCs aren't static mannequins. Each has a role (lord, blacksmith, mage, innkeeper, guard), an assigned skin from the Hermitcraft pool (Grian for the Lord, Etho for scholars, Technoblade for smiths), a block-precise position —verified with a 6-step protocol that checks floor, feet, head and corners— and a dialogue tree that changes based on the player's state.

The blacksmith Joan, for example, starts with an introduction. If the player has accepted the main quest, Joan mentions he's heard rumors about the lost relic. If the player has already completed the quest, Joan congratulates them and offers a discount at his shop. There are 279 dialogue lines just for the main adventure, and every NPC knows where the player is in the story.

The city of Apex has 61 active NPCs with names, roles and personalities. Beyond the narrative, 13 of them are merchants with functional shops —6 market stalls (vegetables, meat, fish, bread, wool, tools), 2 general stores, a smithy, an armory, an inn, a tavern, and a luxury market— each with their own inventory through the Bukkit Merchant API. The player right-clicks and the native Minecraft trading interface opens. Zero chat commands. Everything designed so a six-year-old can use it.

The RPG system: classes, skills and parties

A world with story needs mechanics. The latest project phase (Phase 44) added a complete RPG system:

ClassArchetypePrimary treesActive ability
PaladinTankheavy_armor + heavy_weaponsWar Crit (8s taunt)
MageDPSenchanting + archeryFireball (projectile)
DruidHealerfarming + alchemyHealing Aura (5 blocks)

Behind this is ValhallaMMO, a skill tree plugin with branched perks that advances via XP on relevant actions (the smith improves by forging, the mage by enchanting). Classes are defined in a Python file (class_config.py) that the AI Director reads to assign starting items, skill points and class tags to the player. The bridge translates that into ValhallaMMO commands.

For cooperative play, AlessioDP Parties (with a shared PostgreSQL backend) allows creating groups. And on the client, Xaero's Minimap shows allies, NPCs and objectives on a minimap that syncs with the server via MapModCompanion.

Everything is operated from the in-game hotbar. No /party create in chat. An item in slot 9 opens an inventory menu with clickable buttons. If a child can click, they can play.

The adventure: quests that matter

The main adventure of Apex —"L'Enigma d'Apex"— is an 8-step chain with a complete narrative arc: a lost relic, a dark wizard, clues scattered across the city, a final dungeon, and a boss encounter. Claude generates it from a Story Bible that defines the tone, characters and plot threads. The AI Director structures it as a node graph with advancement conditions and deploys it to the server.

What a deployed adventure contains

And when the player completes all of this, the question is: what now?

The infinite game: the cron that changes everything

Here's the heart of the project. The answer to "what now?" is: tomorrow there's more.

The idea is a nightly cron job that runs a full generation cycle:

  1. Analysis — the AI Director reads player_quest_status from PostgreSQL. What quests has the player completed? Which NPCs have they talked to? What level are they? What items do they carry?
  2. Narrative generation — Claude receives the player state + the current Story Bible and generates new plot branches. A merchant arrives with news from the north. The blacksmith's daughter has disappeared. There are rumors of an abandoned fortress beyond the river.
  3. Content production — the Director generates dialogues for new NPCs, quest conditions, reward items, spawn positions.
  4. TTS batch — Edge TTS synthesizes all new voice lines. ffmpeg converts them to OGG Vorbis.
  5. Resource pack rebuild — the builder packages the new audio, updates the manifest, serves it via CDN.
  6. World building — if the narrative requires a new structure (a shop, a camp, a dungeon), the Director can place it via FAWE using schematics from the curated catalog.
  7. Deploy — the /adventure/deploy bridge endpoint receives the complete package and applies it to the world live.

When my kids log in the next morning, there's a new quest waiting for them. An NPC that wasn't there yesterday greets them by name. The world has evolved. And the only thing I did was sleep.

The infinite game is not a marketing promise. It's a cron job, an LLM and a database.

The city: schematics, not procedural

One of the most formative failures of the project was trying to generate cities procedurally. I went through 9 iterations —layout engines, zone bitmasks, density tuning, vegetation passes— and the result was always the same: overlapping houses, empty interiors, streets going nowhere. My kids looked at it with the politeness of someone who knows dad worked hard, but the first time I showed them a procedural screenshot, the older one said: "It's OK, but it doesn't look real."

The pivot was radical: stop generating and start curating. The Minecraft community has been building spectacular medieval cities for 15 years. Apex Medieval, a 186x167-block schematic downloaded from mcbuild.org, has cobblestone streets, a gothic cathedral, a castle with a library and throne room, a three-story inn, a market square with stalls, a smithy with a functional anvil, and houses with interiors detailed down to the curtains.

FastAsyncWorldEdit (FAWE) pastes these schematics into the server world asynchronously, without lag. The pipeline is: download the schematic → paste via the bridge API → capture POIs by walking the map (a 20-minute investment per location, reusable across every wipe) → deploy NPCs at captured positions → visually verify with a top-down renderer that reads region files directly.

The result is a world that looks hand-built, because it was —by another human, years ago, with a dedication no LLM can match today. The AI brings the life (NPCs, dialogues, quests, voice), not the architecture. It's a combination that works far better than either on its own.

Side view of Apex South Gate with gatehouse and battlements
Apex South Gate: 14-block-high wall with gatehouse, battlements and central passage. Built, destroyed and rebuilt three times until it was right.

The numbers

MetricValue
Active NPCs (Apex)61 with name + role + skin + dialogue
Total NPCs deployed113
Dialogue lines (main adventure)279
Merchants with functional shop13
Items for sale50+
Captured POIs30
TTS voices generated279+ OGG files
Active quests1 main (8 steps) + 9 side
RPG classes3 (Paladin, Mage, Druid)
Alembic migrations (DB)7
Bridge endpoints15+
Hosting cost0 (own bare metal)
TTS cost0 (Edge TTS, free)
LLM costExisting Claude subscription

What I learned (and what went wrong)

Instructive failures

Decisions that worked

The angle nobody talks about: parenting + engineering + AI

Most articles about applied AI talk about enterprise, productivity, digital transformation. Fair enough. But there's a dimension that gets mentioned too little: AI as a parenting tool.

I'm not building AIMC to publish a paper or to monetize it. I'm building it because I want to spend time with my kids doing something that fascinates them, and I want that time to have value beyond entertainment. I want them to read Catalan without it feeling like homework. I want them to learn teamwork (the Paladin tanks while the Druid heals —that's coordination). I want them to experience a world that responds to their decisions, that teaches them that actions have narrative consequences.

And I want them to see that their father can build something like this. That technology isn't a black box: it's a tool you can shape to create experiences that don't exist in any marketplace.

AI makes this possible because it removes the two barriers that previously made it impractical: content and scale. Before, creating 279 coherent dialogue lines with narrative arcs in Catalan would have been weeks of work. Claude does it in minutes. Before, synthesizing voice in Catalan required expensive licenses or robotic voices. Edge TTS solves it for free. Before, designing a quest system with persistent state and conditional dialogues was a months-long engineering project. With an LLM that generates quest configurations from a narrative in natural language, it's an afternoon.

I'm not saying it's easy. It's 44 phases, hundreds of hours, and the project is far from finished. But the ratio between effort and result has fundamentally changed. A parent with engineering skills and access to an LLM can build experiences that previously required an indie studio with a budget.

What comes next

The nightly cron is the missing piece to close the loop. Today adventures are generated when I request them; tomorrow they'll generate themselves. The pipeline is ready —every piece (state analysis, narrative generation, TTS, deploy) works independently— and all that remains is orchestrating them in a scheduled job.

Beyond that:

Conclusion

AIMC is not a product. It's a project by an engineer-father who wants his kids to experience something you can't buy in any store: a world that knows them, speaks their language, and grows with them. It's also a technical demonstration that the current generative AI stack —LLMs, TTS, agentic orchestration— is mature enough to build rich interactive experiences without an enterprise budget.

Four Docker containers. A Claude subscription. Free Catalan voices. And a kid who this morning told me: "Papa, el Mossèn Llorenç m'ha dit que la reliquia és a la cova del nord. Puc anar-hi?"

Yes, son. You can go. And tomorrow there'll be something new waiting for you.


Back to articles