Skip to content

socekin/flimo_world

Repository files navigation

Flimo World

platform requirements license Contact

AI-Powered Interactive Story Creator - Create immersive narrative worlds with AI-generated characters, scenes, and interactive mystery gameplay.

๐Ÿ“ฌ Contact: @jayfxfx on Telegram


โœจ Features

Feature Description
๐Ÿ—ฃ๏ธ Natural Language Creation Describe your world in plain English and watch it come to life
๐ŸŽญ AI-Generated NPCs Unique characters with personalities, goals, and hidden secrets
๐ŸŽจ AI Visuals Environment scenes and character portraits generated by AI
๐Ÿ—บ๏ธ Interactive World Map Visual world builder with draggable location markers
๐Ÿ” Mystery Game Mode Play through stories as interactive detective games
๐Ÿ’ฌ Multi-turn Editing 5-turn context memory for coherent story refinement

๐Ÿ›  Tech Stack

Category Technology
Frontend React 18 + Vite
Styling Tailwind CSS + shadcn/ui
3D Engine Three.js + React Three Fiber
LLM OpenRouter API (Gemini 2.5 Flash)
Image Generation Google Gemini
Deployment Cloudflare Pages

๐Ÿš€ Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/socekin/flimo_world.git
cd flimo_world

# Install dependencies
npm install

# Copy environment example
cp .env.example .env.local

Configuration

Edit .env.local with your API keys:

# LLM (Required)
VITE_OPENROUTER_API_KEY=your_openrouter_key
VITE_OPENROUTER_MODEL=google/gemini-3-flash-preview

# Image Generation (Required)
VITE_GEMINI_API_KEY=your_gemini_key
VITE_GEMINI_IMAGE_MODEL=gemini-2.0-flash-exp-image-generation

Development

npm run dev
# Open http://localhost:5173

Build

npm run build

๐Ÿ“ Project Structure

flimo_world/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ agent/              # AI Agent System
โ”‚   โ”‚   โ”œโ”€โ”€ orchestrator/   # Workflow orchestrator
โ”‚   โ”‚   โ”œโ”€โ”€ router/         # Intent recognition & routing
โ”‚   โ”‚   โ””โ”€โ”€ skills/         # Modular skill modules (19+ skills)
โ”‚   โ”œโ”€โ”€ components/         # Shared React components
โ”‚   โ”œโ”€โ”€ pages/              # Page components (Create, Play, Game)
โ”‚   โ”œโ”€โ”€ game/               # 3D game mode components
โ”‚   โ”œโ”€โ”€ lib/                # API clients & utilities
โ”‚   โ””โ”€โ”€ i18n/               # Internationalization
โ”œโ”€โ”€ public/                 # Static assets (images, videos, fonts)
โ””โ”€โ”€ *.json                  # Sample story & NPC data

๐ŸŽฎ How It Works

Create Mode - AI-Powered Story Generation

flowchart LR
    subgraph Input
        A[User Prompt]
    end
    
    subgraph LLM["๐Ÿค– LLM Processing"]
        B[Story World Generator]
        C[NPC Designer]
        D[Mystery Generator]
    end
    
    subgraph ImageAI["๐ŸŽจ Image AI"]
        E[Environment Image]
        F[NPC Portrait]
        G[World Map Image]
    end
    
    subgraph Output
        H[Complete Story]
    end
    
    A --> B
    B --> C
    C --> D
    B --> E
    C --> F
    D --> G
    E --> H
    F --> H
    G --> H
Loading

Create Mode LLM Skills (18 Skills):

Skill LLM Call Description
story-world โœ… Generate world setting, background, truth
story-npc โœ… Create NPCs with personalities & secrets
mystery-world โœ… Generate mystery plot & clues
mystery-npc โœ… Create NPC dual versions (creator/player)
environment-image โœ… Generate scene images via Gemini
npc-image โœ… Generate character portraits
worldmap-layout โœ… Plan location layout on map
worldmap-image โœ… Generate final world map image

Play Mode - AI-Driven NPC Behavior

flowchart TD
    subgraph Init["Game Start"]
        A[Create Session] --> B[Initialize NPCs]
    end
    
    subgraph Loop["๐Ÿ”„ Behavior Loop"]
        C{NPC Idle?}
        D["๐Ÿค– Think API"]
        E[Get New Action]
        F[Navigate to Location]
        G[Perform Action]
    end
    
    subgraph Chat["๐Ÿ’ฌ Player Interaction"]
        H[Open Chat]
        I["๐Ÿค– Chat API"]
        J[NPC Response]
        K[Update Memory]
    end
    
    B --> C
    C -->|Yes| D
    D --> E
    E --> F
    F --> G
    G --> C
    
    C -->|Player talks| H
    H --> I
    I --> J
    J --> K
    K --> C
Loading

Play Mode LLM APIs:

API LLM Call Description
POST /sessions โœ… Initialize NPC states with AI
POST /npcs/{id}/think โœ… NPC decides next action
POST /chat โœ… NPC responds to player
POST /interact โœ… NPC-to-NPC dialogue
POST /chat/open โœ… NPC greeting when player opens chat
POST /chat/close โœ… Summarize conversation to memory

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under CC BY-NC-SA 4.0.

  • โœ… Attribution - You must give appropriate credit
  • โœ… ShareAlike - Derivatives must use the same license
  • โŒ NonCommercial - Commercial use is not permitted

๐Ÿ™ Acknowledgements


Made with โค๏ธ by Jay

About

AI-Powered Interactive Story Creator - Create immersive narrative worlds with AI-generated characters, scenes, and interactive mystery gameplay.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

โšก