Literal Storyboard: AI Fantasy Board Game Architecture & Performance Benchmarks

Live web application screenshot and interface of Literal Storyboard

Literal Storyboard: AI Fantasy Board Game Architecture & Performance Benchmarks

Key Takeaways: Literal Storyboard is an AI-driven narrative RPG board game that merges procedural fantasy cartography with dynamic multi-model generative AI. Powered by React / Vite, OpenRouter Multi-Model API, and Docker Compose, it introduces sentiment-as-game-mechanic, real-time procedural story beats, and graceful offline fallback — all deployable via AWS Amplify. https://story.nevatal.id/

Live web application screenshot and interface of Literal Storyboard
Live web application interface of Literal Storyboard (https://story.nevatal.id/)

The Engineering Challenge: Why Literal Storyboard Was Architected

Traditional digital board games rely on hardcoded dialogue trees and static scenario scripts, exhausting narrative novelty after a single playthrough. Pure text-based LLM chat games lack structured board-game progression, tactile map movement, or visual scene immersion. Literal Storyboard was created for the AWS Game Builder Hackathon to bridge this gap, merging procedural fantasy cartography with dynamic multi-model generative AI to deliver a tactile, evolving board-game experience where every dice roll spawns a unique narrative.

Core Architecture & Technical Stack Deep-Dive

The application operates as a client-orchestrated React Single Page Application communicating with OpenRouter cloud endpoints, deployable via AWS Amplify or Docker Nginx. The system architecture is modular, separating concerns between the client-side game engine, AI orchestration layers, and external service integrations.

Client Presentation Layer

The user interface is built with React, Vite, and Tailwind CSS, ensuring fast refresh cycles and responsive design. The Single Page Application architecture minimizes full-page reloads, providing a seamless gameplay experience.

Game Engine Core (src/game/)

The game engine manages map coordinate matrices, dice rolls, NPC state machines, and victory conditions. It implements a snake-and-ladder style board traversal across 45+ coordinate-mapped cities on the illustrated fantasy continent of Eldoria, tracking party tokens and progression state.

AI Orchestration Layer

Literal Storyboard leverages the OpenRouter Multi-Model API, allowing developers to swap any text or image generation model dynamically. This abstraction layer integrates multiple LLMs for narrative generation, sentiment grading, and scene painting, providing flexibility and vendor independence.

Sentiment Grading System

A core innovation is the sentiment-as-game-mechanic. The AI acts as a moral arbiter, grading the emotional tone of player choices. Kind, supportive answers win allies; cruel, cynical ones create enemies. Reaching +3 net allies triggers victory, while -3 triggers exile, creating dynamic branching narrative consequences.

Dynamic AI Scene Painting

The system generates visual scenery prompts and paints atmospheric background art behind the narrative text. This dynamic background painting fades and changes based on the player’s current location and the generated story environment, enhancing visual immersion.

Offline Fallback Engine

To ensure accessibility, Literal Storyboard features bundled offline story beats and artwork. The game remains completely playable without requiring an API key or network connectivity, providing graceful degradation when credentials are omitted or requests fail.

Key Features Breakdown & Practical Benefits

  • Real-time Procedural Story Beats: Unique NPC encounters, lore-grounded story beats, and branching dialogue choices are synthesized on-the-fly for every destination city, ensuring no two playthroughs are identical.
  • Snake-and-Ladder Board Mechanics: Players roll dice to move their party across the fantasy map, combining traditional board game progression with AI-driven narration.
  • Sentiment as a Core Game Mechanic: The AI evaluates tone to alter faction standing and win/loss conditions, making player choice mechanically significant.
  • Dynamic AI Scene Painting: Atmospheric background art changes in real-time to correspond with the generated environment descriptions.
  • Zero-API Key Fallback: Bundled offline narratives ensure the game remains functional without API keys, lowering the barrier to entry for prototyping and education.

Real-World Deployment & Production Topology

Literal Storyboard is deployed live at https://story.nevatal.id/. The production topology utilizes AWS Amplify for hosting and domain management, with Docker Compose available for local development and containerized deployment. The client-side React application communicates with OpenRouter cloud endpoints over HTTPS (Port 80 / 443), leveraging CORS-configured reverse proxy routing.

The system architecture follows a client-orchestrated model where all game state, AI requests, and rendering occur within the player’s browser. This eliminates server-side compute costs for AI inference while leveraging the OpenRouter network for multi-model LLM capabilities. The React application manages local game state, while external API calls handle text generation, sentiment analysis, and image painting.

Data Flow & Step-by-Step Workflow

  1. Player Movement: Player rolls dice; the Game Engine calculates new coordinate position on the SVG fantasy map.
  2. Destination Trigger: Upon landing on a new city coordinate, the Engine requests a procedural story beat from the OpenRouter API.
  3. AI Narrative Generation: The selected LLM generates unique NPC encounters, lore, and branching dialogue choices tailored to that specific city.
  4. Sentiment Analysis: Player dialogue choices are sent to the LLM for tone grading, which updates faction standing (ally/enemy counts).
  5. Scene Painting: AI generates scenery prompts that paint the dynamic background behind the narrative text.
  6. Victory/Defeat Check: The Engine evaluates if ally/enemy thresholds (+3 or -3) have been met, triggering win/loss conditions.
  7. Fallback: If no API key is present or requests fail, the Engine renders bundled offline story beats and static backgrounds.

Architectural Comparison: Literal Storyboard vs Traditional Approaches

Dimension Literal Storyboard Traditional Board RPGs
Narrative Generation Procedural, real-time AI generation via OpenRouter Multi-Model API Hardcoded dialogue trees, static scripts
Game Mechanics Sentiment-as-mechanic: AI grades choice tone; +3 allies = victory, -3 = exile Fixed rulesets, manual DM adjudication
Map Progression Snake-and-ladder style over procedural fantasy SVG map (Eldoria, 45+ cities) Static boards, pre-designed maps
Model Flexibility Swap any text or image generation model via OpenRouter interface Engine-locked content, difficult to modify
Offline Playability Bundled offline story beats; fully playable without API keys Typically requires purchased content or DM presence

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *