ChakraCHAKRA
ServicesCase StudiesDesign LabProcessPricingAbout
Free Scan
Let's Talk
ChakraCHAKRA

AI engineering & automation for growing businesses. Turning AI into measurable business outcomes.

Explore

  • Case Studies
  • Process
  • Pricing
  • Free Scan
  • About

Get Started

  • Book a Call
  • Contact
  • Newsletter
  • Search

Legal

  • Privacy Policy
  • Terms of Service
  • Payment & Refund

© 2026 Aashapura LLC. All rights reserved.

Privacy·Terms·Payment & Refund
← Back to case studies
Isekai EngineAI Gaming / Interactive NarrativeLiveFull-stack AI narrative game — world generation, persistent state, LLM storytelling7 min read

AI Isekai Narrative Engine: Reincarnation RPG with Living Worlds

Isekai Engine is a live AI-driven narrative game engine built around the isekai trope: you die in your world and reincarnate into a fantasy realm. Give it a world type and a player name and it returns a fully AI-generated world — complete with a named world, an era, and an opening narrative that puts you immediately in scene. Under the hood the world keeps a live tick counter, day-season-year calendar, and persistent player state including class and level. The engine runs on a Rust/Axum backend with a Next.js SSR frontend, routes LLM calls through ark-proxy, and uses ark-auth for session management. The core job is verified live: a real game called 'Aethermere — Azure Era' is running in spring, day 7 of year 1, with a Warrior named Kaito having survived 980 ticks.

Sections

Key MetricsWalkthroughThe ChallengeWhy This Approach?Build ProcessChallenges & SolutionsHow AI Powers ThisResultsSystem OverviewTechnologies Used

Key Metrics

World generation

Before

Static game worlds — same template for every player

After

AI-generated unique world name, era, and opening narrative per request — verified live: distinct worlds returned on consecutive requests

World persistence

Before

Game state lost on session end

After

Persistent tick counter, day/season/year, and player record — verified: game 229a55a3 at tick 980, day 7, spring, year 1 with player Kaito the Warrior at level 1

Time to scene

Before

Multi-step character creation before any narrative

After

Single POST with worldType + playerName returns world name, era, and full opening narrative — player is in scene on the first response

Core job verification

Before

E2E PASS on 2026-07-03

After

GET /api/games returns live game state; POST /api/world-gen returns AI-generated world and narrative — both public endpoints, no auth required

Watch the Walkthrough

A real screen-capture of the running system — no slides, no mockups.

The Challenge

The isekai genre — reincarnation into another world — is built on a single dramatic moment: you die, the status window appears, and a new life begins. Capturing that moment in software means the AI cannot return a generic 'world generated' confirmation. It has to drop the player into scene immediately, with a world name that sounds real, an era that sets tone, and an opening paragraph that puts the player face-down in mud outside a village with smoke on the horizon. Then the world has to keep existing — ticking forward, tracking seasons and years — whether the player is watching or not.

Why This Approach?

Backend language

Rust with Axum

Game world state — tick counters, player records, game IDs — cannot corrupt silently. Rust's ownership model makes data races impossible at compile time, and Axum handles concurrent game sessions without the GC pauses that would make a tick-accurate world clock jitter.

Alternatives considered: Node.js, Python/FastAPI, Go

LLM routing

ark-proxy for all LLM calls

Routing through ark-proxy means the model can be swapped or upgraded without touching game code, and rate limits and billing are handled centrally. World generation is a one-shot call — the proxy overhead is negligible, and the routing consistency is not.

Alternatives considered: Direct OpenAI/Anthropic API calls, embedded model

World time model

Tick-based calendar with day/season/year

Isekai worlds run on their own time, not the player's clock. A tick counter lets the world advance independently — confirmed live with a game at tick 980 on day 7 of spring, year 1 — and gives a natural anchor for future narrative events tied to world time.

Alternatives considered: Real-time clock, manual player-driven time

Auth model for core endpoints

Public read + public world generation, auth-gated for session management

GET /api/games and POST /api/world-gen are publicly accessible — anyone can read live game state or spin up a new world without a login. This keeps the demo barrier to zero. ark-auth is wired in for player-linked persistent sessions once a player wants to claim their world.

Alternatives considered: Fully gated behind auth, anonymous ephemeral sessions only

Build Process

1

World generation API

POST /api/world-gen accepts a world type and a player name and returns a UUID game ID, a named world with an era (e.g. 'Aethermere — Twilight Era'), and an AI-generated opening narrative that puts the player in scene immediately — the same moment verified live in E2E: reincarnated face-down in a muddy field outside Millhaven, status window flickering, smoke on the horizon.

2

Persistent world state

Each game maintains a live tick counter, day/season/year calendar, and player record with class and level. Verified live: game 229a55a3 shows Kaito the Warrior at level 1, day 7 of spring, year 1, having accumulated 980 ticks since world creation. The world keeps running whether the player is logged in or not.

3

Next.js SSR frontend

The isekai-engine frontend is a Next.js SSR application served at :3119, deployed to the VPS behind Cloudflare at isekai-engine.chakrakali.com. It connects to the Rust backend for game state and world generation, with ark-auth handling player sessions for linked accounts.

Challenges & Solutions

Impact

A generic 'world created' response breaks the isekai premise before it starts — the player needs to be in scene immediately, not told to wait for narrative.

Solution

POST /api/world-gen returns a world name, era, and full opening narrative in a single response — AI-generated to match the world type and player name, delivered at request time.

Result

Verified live: 'You die in your world and wake up face-down in a muddy field outside a village called Millhaven. A translucent status window flickers before your eyes — you have been reincarnated with memories intact.' — returned on the first request, no second round-trip.

How AI Powers This

AI Capability

AI World Name & Era Generation

Every new world gets a distinct, atmospheric name with an era suffix — 'Aethermere — Azure Era', 'Aethermere — Twilight Era' — so each player starts in a unique instance of a living world, not a copy-paste template.

Business outcome

Two sequential world generations for the same world type return distinct names and eras — verified: 'Aethermere — Azure Era' (existing game) vs 'Aethermere — Twilight Era' (new generation in E2E).

Under the hood

POST /api/world-gen → LLM call via ark-proxy with worldType + playerName context → returns worldName (name + era) + openingNarrative in a single response.

How success is measured: Name distinctiveness and narrative coherence per world-type input

AI Capability

AI Opening Narrative

The first thing a player reads after world generation is not a loading screen or a menu — it is an in-scene paragraph that puts them immediately in the body of their reincarnated character, mid-scene, with environmental detail and immediate stakes.

Business outcome

Verified: opening narrative includes specific village name (Millhaven), environmental detail (muddy field, smoke, shouting), immediate intrigue ('Something is wrong') — all contextually generated for a fantasy world type.

Under the hood

LLM prompt includes worldType, playerName, and worldName to generate an immersive opening paragraph written in second person, present tense, with environmental anchors and immediate conflict.

How success is measured: Narrative coherence, scene specificity, immediate stakes — no generic text

Results & Metrics

World generation

Improved

Before

Static game worlds — same template for every player

After

AI-generated unique world name, era, and opening narrative per request — verified live: distinct worlds returned on consecutive requests

World persistence

Improved

Before

Game state lost on session end

After

Persistent tick counter, day/season/year, and player record — verified: game 229a55a3 at tick 980, day 7, spring, year 1 with player Kaito the Warrior at level 1

Time to scene

Improved

Before

Multi-step character creation before any narrative

After

Single POST with worldType + playerName returns world name, era, and full opening narrative — player is in scene on the first response

Core job verification

Improved

Before

E2E PASS on 2026-07-03

After

GET /api/games returns live game state; POST /api/world-gen returns AI-generated world and narrative — both public endpoints, no auth required

System Overview

FrontendNext.js UIAPIRoutes + authDatabasePostgreSQLAIRAG + agentsExternalSaaS APIs

The architecture below is the technical foundation behind every business outcome on this page — built for reliability, low running cost, and the speed your customers feel.

Rust/Axum backend (ark-isekai, :3457) handles game state persistence, world generation orchestration, and tick management. LLM calls route through ark-proxy for model independence. ark-auth provides JWT session management for player-linked accounts. Next.js SSR frontend (isekai-engine, :3119) deployed to VPS at isekai-engine.chakrakali.com via Cloudflare. PostgreSQL stores game records with UUID IDs, world metadata, tick counters, and player state.

Technologies Used

Rust, Axum, PostgreSQL, Next.js, TypeScript

RustAxumNext.jsTypeScriptPostgreSQLRustAxumNext.jsTypeScriptPostgreSQL
Try the Live Demo
Back to Case Studies