In the traditional world of software engineering, building a Multi-User Dungeon (MUD) is a rite of passage. It requires handling complex state, real-time networking, concurrency, and deep game logic. Usually, this takes months of meticulous, line-by-line keyboard grinding.

But for AIMUD, we didn’t just code; we vibe coded.

By leveraging an ensemble of cutting-edge tools—IntelliJ Junie, IntelliJ Gemini, IntelliJ Co-Pilot, and Google Anti-Gravity—we shifted our focus from “how to write the syntax” to “what the soul of the game should be.”

What is Vibe Coding?

Vibe coding is the evolution of “Human-in-the-Loop.” It’s a workflow where the architect provides the “vibe”—the high-level intent, the architectural patterns, and the creative direction—while a suite of AI agents handles the implementation, refactoring, and boilerplate.

Crucially, Vibe Coding is not here to replace the Software Architect or Developer; it is here to assist and augment them.

While these tools can significantly increase the speed of development, Vibe Coding is not an independent process. To develop software that is maintainable, scalable, and able to be expanded, a professional must always be available to monitor the changes. An architect must review the generated code, enforce consistency, and tell the system when it has made a mistake or deviated from the intended design. In this model, the human moves from “bricklayer” to “conductor,” ensuring the AI’s speed is directed toward a robust and lasting structure.

In the case of AIMUD, the “vibe” was a modern, Spring Boot and Angular-based engine where every NPC (Mobile) is backed by an LLM, making the world truly alive.

The Ensemble at Work

1. The Architect: IntelliJ Gemini

We used IntelliJ Gemini as our primary architectural partner. When designing the complex spell and prayer systems (see SpellService.java and the vast prayers package), Gemini helped us structure the inheritance model. We didn’t manually create 50+ individual spell classes; we defined the “vibe” of a damage-over-time (DOT) spell and a direct-damage spell, and Gemini proliferated the implementations across the spells and prayers directories.

2. The Implementation Engine: IntelliJ Junie & Co-Pilot

While Gemini handled the big picture, Junie and Co-Pilot were our “hands on the keyboard.”

  • Junie excelled at deep-context refactoring. When we needed to update the Mobile model to support AI instructions (061-mobile-ai-instructions.sql), Junie coordinated the changes across the Java models, the Liquidbase changelogs, and the Angular frontend components.
  • Co-Pilot acted as the ultimate autocomplete, predicting the repetitive logic in our command patterns (AttackCommand.java, CastCommand.java), allowing us to fly through the implementation of the game’s interaction layer.

3. The Secret Sauce: Google Anti-Gravity

Building a MUD in 2024 means integrating LLMs. We used Google Anti-Gravity to manage the heavy lifting of our AI integrations. Specifically, it helped us optimize the OllamaChatModel.java and McpToolService.java, ensuring that the “vibe” of our AI agents—their personalities and non-combat behaviors—remained consistent and low-latency.

Architectural Highlights of the Vibe-Coded MUD

The result of this AI-augmented process is a remarkably robust and clean codebase:

  • The Model-Driven World: A highly relational schema managed via Liquibase that handles everything from Faction relationships to MobileMacro automation.
  • Reactive Communication: A WebSocket-based core (GameWebSocketHandler.java) that provides the real-time feedback loop essential for MUDs.
  • Pluggable AI Agents: A dedicated AiService and Agent model that allows NPCs to utilize the Model Context Protocol (MCP) to interact with the game world just like players do.
  • Modern Frontend: A Material Design-inspired Angular application that brings a 1980s concept into the modern web era.

The Roadmap: Coming Soon to AIMUD

While the foundation is solid, a mature MUD requires depth. Our ensemble is currently working on the following features to bring AIMUD to parity with legendary engines like Diku or CircleMUD:

1. Core Gameplay Mechanics

  • Stealth Expansion: Moving beyond basic hide, we are implementing Sneak, Trap Detection, and Disarming for a full rogue utility kit.
  • Natural Recovery: Adding rest, sit, and sleep states to modulate HP/Mana recovery outside of combat.
  • Consumable Systems: A full Potion system for immediate magical “quaffing” (e.g., Potion of Giant Strength) and specialized consumable variety.
  • Deep Crafting: Expanding trade skills like Blacksmithing, Tailoring, and Alchemy to complement the existing merchant system.

2. Magic & Bardic Versatility

  • Utility & Teleportation: Staple spells like identify, detect magic, locate object, and word of recall.
  • Summoning: The ability to summon other players or pets/familiars.
  • Bardic Crowd Control: Songs to lullaby entire rooms or charm NPCs into service.
  • Hybrid Prayers: More “holy warrior” utility like Lay on Hands and Detect Evil for Paladin/Cleric hybrids.

3. Equipment & Inventory

  • Container Management: put <item> in <bag>, get <item> from <bag>, and nested inventory for bags, chests, and backpacks.
  • Durability & Decay: Item wear-and-tear mechanics paired with a repair system.
  • Expanded Slots: Secondary equipment locations for Cloaks (Back), About-Body items, and Held utilities (non-weapon/shield).

4. Social & World Complexity

  • Custom Roleplay: Moving beyond fixed emotes to allow custom pose and freeform emote strings (e.g., emote leans against the cold stone wall.).
  • Global Communication: “OOC” (Out of Character) and “Gossip” channels for server-wide community interaction.
  • Extra Descriptions: Enhancing look to interact with atmospheric details described in room text that aren’t physical items.
  • Quest Engine: A formal system for tracking objectives, rewards, and branching AI dialogue trees.

Administrative & “Immortal” Functionality

To manage a living world, we are implementing a suite of “Immortal” commands. The architectural foundation is already in the User role field, and the reflective CommandService makes these additions seamless.

World Manipulation

  • goto <roomID/player>: Instantly teleport to a specific location or player.
  • transfer <player> <roomID>: Forcefully move a player to a new location.
  • purge: Remove all NPCs or items from a room to reset its state.

Player & Connection Management

  • mset <player> <stat> <value>: Manually edit attributes like Strength or Intelligence.
  • freeze/unfreeze <player>: Prevent or restore a player’s ability to enter commands.
  • disconnect/kick/ban: Forcefully drop connections or permanently restrict access at the IP/Username level.
  • sockets: Real-time visibility into all active WebSocket connections.

AI-Specific Utilities

  • Agent Control: Tools to reset or re-prime the OllamaChatModel for specific NPCs.
  • Instruction Injection: Manually update an agent’s systemInstruction during live gameplay without using the web dashboard.

Getting Started with AIMUD

Ready to see the vibe in action? Follow these steps to get the engine running on your machine.

Prerequisites

  • Java 21+ (Spring Boot 3 compatibility)
  • Node.js 18+ & npm
  • Docker (for the database and Ollama instance)
  • Ollama (installed and running for LLM-backed NPCs)

1. Clone and Prepare the Backend

git clone [https://github.com/ghost-programmer/aimud](https://github.com/ghost-programmer/aimud)
cd aimud
./gradlew build

2. Spin up the Environment

Use the provided docker-compose.yml to set up your PostgreSQL database and any required middleware:

docker-compose up -d

3. Run the Backend

Start the Spring Boot application. Liquibase will automatically run the changelogs to set up your schema.

./gradlew bootRun

4. Launch the Frontend

Navigate to the frontend directory to start the Angular development server:

cd frontend
npm install
npm start

The game will be available at http://localhost:4200.

Lessons Learned

Vibe coding isn’t about being lazy; it’s about being leveraged.

By using four different AI tools, we were able to cross-reference their outputs. If Co-Pilot suggested a logic flow that Gemini flagged as architecturally inconsistent, we could pivot instantly. This “ensemble” approach minimized the hallucinations that often plague single-AI development.

AIMUD stands as a testament to what a single architect can achieve when they stop worrying about semicolons and start focusing on the experience. The code was written by AI, but the vibe is entirely human.

Explore the Code:

AIMUD is built on Spring Boot, Spring AI, and Angular Material. You can explore the full source code and see the future of AI-driven gaming on GitHub:

github.com/ghost-programmer/aimud


Discover more from GhostProgrammer - Jeff Miller

Subscribe to get the latest posts sent to your email.

By Jeffery Miller

I am known for being able to quickly decipher difficult problems to assist development teams in producing a solution. I have been called upon to be the Team Lead for multiple large-scale projects. I have a keen interest in learning new technologies, always ready for a new challenge.