Inspiration

Living Worlds came from the feeling that learning should sometimes feel like stepping into a story instead of studying a page.

I love tabletop RPGs because a good Dungeon Master does something most software does not do. They remember what you did. They make small choices matter later. They let you try weird ideas, but they also make you live with the consequences. That felt like a really interesting shape for education.

For the demo, we picked Ancient Rome because the end of the Republic is just naturally dramatic. You have Caesar, the Senate, Brutus, fears of monarchy, ideas about liberty, omens, patronage, status, and violence all tangled together. Those are usually things students read about from a distance. Here, we wanted them to become things the player has to deal with.

What it does

Living Worlds turns a subject into a playable roleplaying world.

In this demo, you play someone close to Julius Caesar in the days before the Ides of March. You can question people, follow rumors, protect Caesar, accuse the wrong person, start a fight, calm one down, or do something we did not predict.

It is not meant to be a quiz. That was really important to us. The point is not “do you remember the correct fact.” The point is more like, “can you use what you understand while the world is pushing back.”

So instead of being told that Roman politics were tense, you feel that tension when accusing a senator could save Caesar, ruin your reputation, or push a conspiracy further underground.

How we built it

We built a web RPG with a visual novel style interface, reusable backgrounds, character portraits, voice playback, speech-to-text input, dice rolls, pause/context questions, and campaign memory.

The main design choice is that the AI does not just directly rewrite the world whenever it wants. It proposes what should happen next, and then the runtime checks the proposal before anything becomes real.

That matters because roleplaying games get weird fast. The player can type almost anything. So the system has to be flexible, but it also has to remember who people are, what has already happened, what the player actually knows, and what consequences are still hanging over the story.

Characters have names, aliases, voices, appearances, roles, and knowledge boundaries. If someone starts as “a guard” but becomes important, the system can turn them into a real recurring character. That sounds small, but for this kind of game it is everything.

We also trace the AI calls internally so we can see what each agent received, what it returned, what got validated, and what actually became canon. Not because players should see that, but because if you are building a persistent world, you need to be able to debug the ghosts in the machine.

Challenges we ran into

The hardest part was making the game feel free without letting it become mush.

If the player can type anything, the AI has to be creative. But if it is too unconstrained, it forgets details, contradicts itself, invents facts, or solves the whole mystery too early. So a lot of the work was building rails that do not feel like rails.

The historical side was also trickier than expected. We wanted it to be dramatic and fun, but still grounded. At one point we wanted an arena scene and reached for the Colosseum, because obviously, Rome. Then we remembered that the Colosseum is later than Caesar. Oops. So we switched to a temporary wooden arena instead. That is exactly the kind of thing this project should care about.

Cost was another real constraint. We did not want to generate images every turn or send everything to the most expensive model. So we made reusable backgrounds, cached portraits, and split the work between heavier reasoning tasks and lighter helper tasks.

Accomplishments that we're proud of

I am proud that it actually feels like the start of a game.

You can make a character, enter the scene, type a freeform action, roll dice, get a real consequence, pause to ask what your character knows, reload the page, and keep going. That sounds obvious when written out, but getting those pieces to feel connected was a lot.

I am also proud of the memory approach. It is not just a chat history. The system tries to keep track of consequences, character knowledge, identities, and what became true. The AI can be imaginative, but the validated memory is what decides the canon.

That is the part I think is coolest. It gives the story some weight.

What we learned

We learned that educational AI does not have to start with “explain this concept.”

Sometimes the better question is, “what situation would make this concept matter?”

Roman republican politics are easier to care about when your character has to decide whether Brutus is a patriot, a traitor, a frightened aristocrat, or all three depending on who is talking.

We also learned that memory is more complicated than summarizing. A world needs to remember facts, yes, but also suspicions, promises, relationships, costs, and who knows what. That last part matters a lot. If the player can ask anything and get omniscient answers, the game breaks.

And honestly, we learned that constraints make the thing more fun. Dice, consequences, historical limits, and character knowledge boundaries all make the world feel less like a chatbot and more like a place.

What's next for Living Worlds

Next, we want to make more worlds.

More history campaigns, definitely. The American Revolution, feudal Japan, maybe modern urban fantasy later because we still want this to be fun and not just homework wearing a toga.

We also want better tools for teachers and creators. Ideally someone could build a civics simulation, a literature mystery, a science expedition, or a language-learning city where conversation actually matters.

The long-term idea is that learning can happen through inhabiting a world. You make choices, things happen, people remember, and when you leave, you understand the subject a little differently because you had to live inside it for a while.

Built With

  • ai-agents
  • cloudflare-d1
  • cloudflare-workers
  • education
  • gpt-5
  • gpt-5.6
  • historical-simulation
  • image
  • next.js
  • openai
  • react
  • roleplaying-games
  • speech-to-text
  • sqlite
  • structured-outputs
  • tailwind-css
  • text-to-speech
  • tts
  • typescript
  • vinext
  • whisper
Share this project:

Updates