IMPORTANT Notes to judges

Project Split and current bolt links

Before the Wall of Text starts, please note:

I had to split the project into frontend and backend because it became too large. This is the official recommendation from the bolt.new docs on it: https://support.bolt.new/best-practices/maximizing-token-efficiency#split-the-project

Thus, I don't have one bolt project link, but two:

Thus you cannot start up the app directly in bolt in fullstack anymore. I had to move the testing to localhost after the project split. You can test the app on my deployed demo version: use the try-out link I provide in other form fields.

- >See also discussion here <-

Also I'll try to register the domain: ** https://runes-of-reason.com ** but it seems it's not available yet, so I added the direct ec2-links.

Archived Bolt links

If you want to evaluate the project, you probably best use the backend and ui link above. But to be fully transparent on my process:

I started here on 8th june (judging from first commit timestamp): https://bolt.new/~/sb1-9cmdinvf

Later I duplicated it to renew context window, as suggested by bolt.new docs: https://bolt.new/~/sb1-d5psytij

Since this didn't help much, I did the project split, leading to the current situation with backend / frontend split.

How to test

(Don't worry, this will make sense when you have read the details or jump into the game)

  • Registration: Since character creation already is an essential part of the game experience, you'll have to create a new account in the "Register" tab. For judging period, I have skiped the email validation, so you don't need to provide your real mail adress if you don't want to. Thus, registration has absolutelely no requirements (hope that won't get abused).

  • Activating the Story Writer: Since the quest system is not implemented yet, I added a button on the world map. When you increase "Concord" by 10 points this way, the next zone will be unlocked or story arc will be written. Zone / Story generation happens async: Since both are complex tasks that require lots of reasoning by Gemini, you'll probably need to wait around three minutes and then reload the page to see the new Zone or Story Arc (explained below in "known issues").

  • Also take "known issues" into account, if things behave weirdly.


Inspiration

I am an enterprise software engineer. I have always had the dream to one day build a little indie game, but I never found the time. When a colleague advertised for the hackathon (and vibe coding in general), I knew that was my chance.

Some months ago, I listened to the Narnia Audio Books and I had this idea of how the world of Narnia and other fantasy stories could potentially be built as a video game with an AI-powered Engine. I imagined the system prompt like: "You are the game engine of an RPG. The world state is X, the player does action Y - what will happen next?".

When I started the hackathon and couldn't come up with something "useful" to build, this idea was still spooking around in my head. So I started the conceptual exploration of what aspects of RPGs like The Elder Scrolls, Diablo, or Pen and Paper games could be changed if you added LLMs to the solution space.

The result is the AI-MMORPG prototype "The Runes of Reason".

What it does

Basically, it tries to solve the same problem every RPG tries to solve: giving players the illusion that they can freely interact with an open world and "do everything they want" in a unique play-through. It's just that, while classical RPGs are limited to scripted systems, an LLM-powered game engine does not need to create an "illusion": it really is creating a unique play-through experience where everything is possible.

RPG Base Mechanics

I'll keep this short, because the interesting part begins in "AI-Powered Game Engine".

The Game foundations

You create your character and jump into one of the game world's "Zones", where you can walk through the 3D scene and interact with many things:

  • Talk to NPCs or other players,
  • read the lore of Points of Interest you discover,
  • travel through portals to other zones,
  • read the "Lore Explorer" in the zone's center (press E on the "runes of reason" 3D model).
  • Harvest resources for your inventory
  • Then you can use Freestyle Crafting to create unique Items
  • Drop inventory items on the ground, so other players can pick them up
  • Terrain structures (mountains, hills, marsh, and water) are "blocking", but other structures are not for various reasons.

When the player community collects enough points (so-called "Concord"), a new zone for the next story arc chapter is procedurally generated. This should be done through quests, but currently, it's only mocked through a button on the world map.

Base Lore: The World of Reliqua

I teamed up with Gemini 2.5 Pro to create the "Base Lore" of "Reliqua," the World of "Runes of Reason."

  • The Runes themselves are the god-like superpower, carved into a stone structure that appears at the center of each zone.
  • There are different races and factions
  • We (Gemini and I) tried to create a mix of medieval fantasy and "mystic / disturbingly alien".
  • Also, there is a secret lore behind the public lore. It explains a hidden truth about the story but must never be revealed. This adds narrative depth and a motivation to play further to find more clues in the Lore.

AI-Powered Game Engine

There are 3 main aspects of AI:

  1. Individual Player Characters
  2. Storytelling
  3. Freestyle Crafting

1. Individual Player Characters

Every player creates a personal character background story. You can write your own, or you can take the default story that the AI generates based on your nickname. From your name, race, class, and background story, your final character with its quirks, traits, fears, weaknesses, specialties, and skills is created.

There are no fixed attributes except for 4 base skills every player has. Instead, the LLM gets creative and tries to create a truly unique character for you.

This is not only a cool way to individualize your game experience - it's also the game's mechanism to foster the non-determinism I am aiming for (to be "creative", LLMs need some variance in their input). The NPC AIs consider the individual story and traits in their conversations (and later in quests, once implemented). The GameMaker AI considers it when it decides what a player can craft. In a future version I want to implement dungeon fights where the GameMaker also bases the results of combat actions based on your character.

2. Storytelling

The "Story Arc Writer" AI takes over the storytelling: it creates a Story Arc with multiple chapters. When enough "Concord" is collected by the player community, the "Runes of Reason" are activated: the next zone is unlocked—or, to be precise, procedurally generated.

A "Zone Writer" AI takes the next chapter in the Story Arc and transforms its rough sketch into a detailed plan for level design. The Zone's Lore, Characters, and Points of Interest like villages and landmarks are generated and pressed into a well-defined instruction format. Those instructions are then used by a ZoneGenerator, which does the procedural generation of the Zone (classical, without AI).

When all chapters of a Story Arc have a Zone generated (the arc is "played through" / completely unlocked), a new Story Arc will be written by the Story Arc Writer. This forms an endless loop; in other words, the Story of Runes of Reason is potentially never-ending (except for when my debit card that pays for the tokens is burned through).

3. Freestyle Mechanics (Currently limited to: Crafting)

The core pattern of the game is: take classical RPG mechanics and remove every limit you can by using LLMs. The "Unique Items and Resources" concept takes this to an extreme: Instead of giving items attributes like "attack" and "defense" or restricting the "types" of items (weapons, shields, potions, ...), in my game EVERYTHING IS ALLOWED. If you manage to craft the "ridiculously good-looking rocking horse (type: decorative item)" and decide to use it in an epic fight against a dragon—that's your decision!

Due to limited time, the only AI-driven mechanic I have implemented so far is: Freestyle Crafting. You throw together an arbitrary selection of resources and items into the crafting process. The GameMaker AI will decide the outcome—based on your ingredients and your personal character's profile.

How I built it

I quickly got good-looking results with bolt.new—the rough architecture:

  • React + Node.js + Three.js for Rendering + WebSockets for real-time aspects.
  • Server is authoritative on core game decisions, communicating via REST APIs
  • But "real-time" actions (player movement) are client-side only (yes, that's cheatable, but it's a prototype and I wanted to spare the server load)
  • Supabase Integration used for persistence
  • Later, Bolt suggested to use "D3-Delaunay" to do the Voronoi calculations I wanted to use in procedural zone generation.

This split into a server-heavy and a "reactive" part of the architecture ensures the core game cannot be cheated, but the server load stays low.

Other tools / libs: Runtime

  • In-game AI is powered by LLM APIs, integrated with LangChain.js
    • I started with OpenAI models but at some point realized that Gemini 2.5 Flash and even Flash-Lite-Preview worked better for my use case while also being less expensive!
    • I am now using a mix of Gemini models (2.5 Pro for complex tasks like StoryWriting and ZoneWriting, Flash for the Crafting GameMaker AI, and Flash-Lite for NPCs) and OpenAI GPT-4.1 (which still works better for the character creation process).
    • All models are configurable by ENV VARs
  • 3D Models: Blender and Meshy
    • First I tried Claude + Blender MCP Server, but the results were not good.
    • Then I switched to Meshy (meshy.ai) for AI-generated models and was instantly thrilled, so I bought credits for $20 (I think I've used only 25% of it so far). I didn't want to use existing models so that I could be 100% sure that I do own my models and have the right to use it for the game.
    • The problem with Meshy is: its quality is too high, so I had to scale some of them down manually with Blender.

Other tools / libs: Development Process

  • Conceptual Brainstorming: ChatGPT + a little Claude
  • Lore Writing: Gemini 2.5 Pro! Hell of a thing!
  • Docs & Sketches: Notepad++ and diagrams.net Desktop (fka draw.io)
  • A custom helper tool for visualizing polygons: StackBlitz + Claude vibe-coded; used to troubleshoot polygon map layout issues

Local Development

Since I was operating on the free tier for the first week or so, I had to switch to manual bug-fixing during the first few days (150k token limit on Bolt). Also, I later got the "project size exceeded" message from Bolt and had to split the project into frontend and backend. For that, I had to switch the dev workflow to testing and troubleshooting on localhost, while most of the coding was still done by Bolt in each project.

Naturally, local development includes some other Tools:

  • Git
  • IntelliJ (yes, I'm a Java guy, so I use this for JavaScript projects, too)
  • Good old organic brain cells (turns out I still need them), localhost, and coffee! Just like in ye good ol' days (i.e., earlier this month).

Deployment / Infra

I just slammed everything together onto one EC2 instance, with Nginx serving the UI.

A game architecture with lots of scheduled loops, in-memory caches, and WebSockets is not a natural fit for serverless platforms like Netlify. But I think it could be possible to use a Netlify and Ably approach sometime in the future.

While the current implementation is would not scale horizontally, I built the game design with this in mind: Zones are a natural fit for sharding / partitioning.

Challenges I ran into

Three main challenges: the project size limit, hidden architectural debt from first prompts, and Three.js debugging.

Project Size Limit:

The context window got full pretty quickly. After trying everything else from the Bolt.New docs, I had to split the project into two smaller ones, using a frontend/backend split approach.

Technical Debt

On this occasion, I realized that I did not really look into the code my first prompts produced. There were some flaws I had to fix for the project split. This threw me back two days.

Three.js 3D scene troubleshooting

Bolt cannot "look into" a 3D scene that's rendered by Three.js. It can only infer problems by looking at the rendering code. For some rather tricky bugs, I had to do manual troubleshooting and fixing.

I also had a very interesting encounter with vibe coding in my first days: Bolt was not able to fix a nasty bug in the 3d scene. I noticed that it did a crazy mix of react and threejs state-management. I told it to decouple it, so that the threejs components would not know anything about react state management. Simply by doing the refactoring, bolt fixed the bug it was not able to fix with 4 attempts before. Turns out even AIs work better on clean architectures.

Accomplishments that I'm proud of

  • The "infinite story arc loop"
  • The Voronoi-based procedural generation with AI-generated instructions as input. I always wanted to build sth like this, but never had the time. Thanks to vibe coding, it's now possible.
  • The general endeavor and having solved all the unexpected impediments

What I learned

As I am neither a game dev nor a React/Node.js guy, and as this was my first "vibe coding" experience, I learned a lot. All those aspects were new to me.

Built in Public

See my LinkedIn profile.

What's next for Runes of Reason

Known Issues

  • Mining (stone, ore, gold) is a bit buggy. The idea is that you must wait some time until the mining is completed. This works, but you have to reload the page after the time is up.
  • Also, there is no player feedback on when a new zone or story arc is created; again, a page reload will reveal the new stuff.
  • The 6 Portals within the zones have stopped working: Actually you could jump to neighbouring zones from there, but they are buggy now. Doesn't matter much, because it's actually even more convenient to just click "leave zone" and use the world map. It was only a little gimmick.
  • sometimes, generated zones are not directly linked to their chapters (you don't see a link to the zone's lore in the world explorer then)

Upcoming Features

Quests and Dungeon Combat System:

Currently, NPCs only make small talk. That's not leading anywhere; they must be able to give you quests and rewards!

Main Characters (written by the Story Writer in the Story Arc, usually three per chapter) will give you main quests. These are related to the story arc and usually include a dungeon fight. The GameMaker AI should generate those dungeons in a way that you cannot directly solve them but have to collect some special items first. To do this, you'll need to complete side quests given by the secondary character NPCs.

Dungeon Fights will get a very simplistic mechanic: health points, attack, and defense. It's turn-based: choose your item to attack, then read how the monster attacks and choose an item to defend yourself with. But how does it work when your items have no "attributes," "levels," or "values"? Of course, the GameMaker AI will creatively decide if your unique character with their unique item can attack this unique monster or defend against its unique attack.

Effects (perks and impairments)

In Fights, and as a result of crafting attempts gone awry, your character will get "Effects". Example: Your character's fear is "explosives" but you tried to craft with the ingredient "holy hand grenade"—the GameMaker AI decides that your character drops the grenade, leading to an explosion, and you gain the "impairment": "partly deaf".

This might inflict NPC dialogs (your response options will probably include "speak up please, I can't hear you"), but more importantly, the GameMaker AI might decide to pick up on this in dungeon fights.

A special side quest type will be introduced that can get rid of impairments.

Perks work the same way but have positive effects.

Even more quest types

  • Crafting Quests: Custom Crafting in your inventory has one problem: you get completely random results. What if you need a specific thing for your main quest? Go ask your local blacksmith or field-wizard; they might know how to produce what you need... and will tell you which special resources to gather (and where the GameMaker AI has just spawned them for you).
  • Money Quests: Get gold or unique resources by solving tasks for an NPC.
  • Character Story Quests: Have you noticed that you can never change your character's story, traits, etc.? This is a quest type that is "disconnected" from story arcs but helps you to "find out more about your own background story". Solving it will grant you the chance to edit your story and re-roll your traits.
  • Effect-Aiding Quests: see "Effects" above.

Merchant NPCs

Also, "Merchants" could be introduced as an additional NPC type where you can simply "buy" stuff you need, instead of crafting / side-questing for it. (The AI knows about your main quest, so the merchants will "accidentally" always have something fitting your needs). That's like a "workaround" or "buy out of the quest" mechanism if you want to skip the side quests.

Skill and Leveling System

The current "skills" of your character are rather decorative. Players should be able to level their character up, and the GameMaker AI should consider this, giving beginners simpler quests and higher-level players the real epic battles.

Zone Events

NPCs are caught in their fixed background story. They are like people who never leave their house: they only have a small pool of topics they talk about.

This could be changed by either having a Writer AI change the background stories periodically to make characters "evolve", and/or by letting the GameMaker AI produce "Zone Events" that the NPCs know about; e.g., "player x has killed all the evil wolves"—now the herder NPC will thank player x proactively when they next talk and also has to think about a different type of quest other than "kill the evil wolves." ;)

To keep things interesting, you have to find ways to foster non-determinism.

Also, I am still looking for a concept that would let players make an impact on the next Zone Design or Story Arc. I want to provide this type of experience: In the next zone, there is a small detail that is generated in a certain way because of some decision YOU have made in your last quest. Everyone can see it, but you are the only one who understands it.

Story Arc Macro Structures

To give story arcs a bit more salt, at some point the StoryWriter would need some creative input. This could also be community-driven: Players suggest what narrative schema the next story arc should have, and then it is voted on ("choose what the next story arc should be about"). Also, players who gathered the most Concord in the current Story Arc could get higher voting power, adding a small competitive notch.

Sponsored Models?

The StoryWriter AI and ZoneWriter AI often make up unique building types: they provide detailed descriptions of them, but in-game we can only render them as a big purple diamond. I realized, though, that especially Claude 4 is very good at creatively rendering models with Three.js. Also, there are services like meshy.ai, so you could create unique models for unique structures.

But this would be rather expensive. One approach could be that this becomes an in-game purchase: players can "sponsor" a 3D model for a unique building, and everyone who reads the lore will then read "3D Model sponsored by..."

Rate Limits / Monetization

If this were to become a real game, I would need to add rate limits per day and per player on how many quests they can do, how many NPC talks they could start, etc., because everything adds up to my Gemini and OpenAI bill.

At this point, a monetization strategy would be needed.

Scalable Infrastructure

Horizontal scaling through zone sharding or a refactoring towards serverless with Netlify and Ably, if that were feasible.

AI Cost Optimizations

  • The current approach of using an LLM for the race/class suggestion on character creation is not a good design; that's actually a better use case for embeddings (semantic vectors).
  • Fine-tuned models that simply "know" the base lore "by heart" could potentially reduce costs, because they'd save lots of system prompt tokens I have to pay for when repeating the base lore.

Built With

Share this project:

Updates

posted an update

https://runes-of-reason.com now working, too

I had a quick look in the nginx config - there was an error for https certificates; I fixed it so that the "nicer looking domain" also works now.

I hope this will not be interpreted as "change after deadline": my official "Try it out" link was the one to the direct ec2 domain and I didnt change anything there. My runes-of-reason domain is just a gimmick because it's easier to remember and looks more trustworthy ;)

Log in or sign up for Devpost to join the conversation.

posted an update

UPDATE on "Known Issues":

Missing Chapter Links in Generated Zones: Fixed last minute yesterday

After completing my submission yesterday, I made a hot last-minute fix prompt on bolt: "generated zones are not linked to their chapters anymore - the storyarc id, chapter id, episode and chapno are null" + after its fix suggestion: "Implement the fix for zone chapter linkage"

Bolt commited its change on 22:52 in my timezone (23:00 was deadline) so I quickly checked if the fix in the code was "minimal-invasive" enough to take the risk... decided it's worth it and triggered my deploy script last minute. I just tested in game and added some concord... it's working, bolt fixed the problem last minute.

Broken Portal Glitch - just my confusion?

On this occasion I noticed that Portals are actually working as expected, when a neighbouring zone exists. Might be possible that when I added the known issue to my submission text, I was simply so tired that I tested on a zone without many neighbours. When the Zone has no neighbour on the side, the portal is located, it's actually not a bug, but a feature, when it displays that "this path ends here, traveler!" (and other creative medieval style sentences bolt made up for me ^.^) I.e. in the "center zone" (episode 1 chapter 1: Glasswater Frontier) all portals actually do lead somewhere. But in "outer zones" you have only 1 working connection of course (add facepalm emoji here)

New Bug uncovered

So that makes 2 less known issues, but I got a new one:

The new Zone for Episode 2 - Chapter 3 is of type "Crystalline Cave". The idea was that those are "underground" zones - but since Story Arc 1 did not have any of those cave maps, I didn't test them intensively on the last days before submission.

Long story short: The "ceilling" is not wide enough, and the outer "walls" not high enough... so you can kind of see the sky which breaks the immersion of a deep underground cave a tiny bit :D

But it's beauty anyway ;)

Log in or sign up for Devpost to join the conversation.