Experimental interactive narrative game that embraces imperfection. Powered by deliberately "outdated" AI models, it creates a glitchy, unstable sci-fi universe that evolves through visual, auditory, and textual synthesis โ where system limitations become aesthetic features.
Infinite Novel is an AI-powered narrative engine that rejects photorealism in favor of raw, unstable generation. It's not trying to look perfect โ it's trying to feel alive and broken.
Core Philosophy:
- ๐๏ธ Lo-Fi AI Aesthetic โ SD 1.5 artifacts = VHS glitches in horror films
- โก Speed over Fidelity โ 2-3 second generations keep you in flow state
- ๐ง Accessible Intelligence โ Runs on consumer hardware (RTX 3060, M1 Mac)
- ๐ Emergent Chaos โ Small models hallucinate = alien intelligence vibes
"Imperfection is the medium. Your 8GB GPU is the canvas."
- Narrative Director: AI manages story arcs (Awakening โ Convergence โ Rupture โ Synthesis)
- Quantum Memory: Markov-inspired state machine with visual context integration
- Fractal Memory System: LSTM + trigonometric "quantum" layers for chaotic prediction
- Player Profiling: 500-action memory builds your unique narrative signature
- Streaming Image Generation: SD 1.5 with visible generation callbacks (watch latents evolve)
- Procedural Music System: Generative ambient with granular synthesis, dub delay, hall reverb
- Glitchy TTS: Tacotron2 with intentional audio artifacts and delay effects
- Streaming Dialogue: Gemma3 1B via Ollama or LM Studio (small = unpredictable = interesting)
- Autonomous Titan AI: Acts independently, can destroy your progress
- Collapse Mechanics: World can genuinely fail (โฅ1.0 = game over)
- Thread-Based Narrative: Keywords create tension fields affecting all generation
- Real-Time Shaders: Displacement, fractal noise, feedback loops, morphing
- Self-Programming Weights: System adjusts modal priorities based on output quality
- Online-Learning MiniUNet: CNN predicts frame deltas during SD generation
- Auto-Dataset Capture: Saves frames + auto-captions for future training
- Pain System: World state affects AI personality and response style
Stable Diffusion 1.5 (2022) instead of SDXL/Flux:
- โ Runs on 8GB VRAM โ democratizes AI art
- โ 2-3 second generation โ maintains flow state
- โ Glitchy artifacts โ creates unstable reality aesthetic
- โ Raw, unpolished look โ fits "collapsing network" theme
- โ Photorealism would break immersion
Gemma3 1B instead of 70B models:
- โ Fast streaming responses โ real-time feel
- โ Unpredictable outputs โ alien intelligence, not corporate assistant
- โ Low resource usage โ runs alongside SD + TTS
- โ Genuine mistakes โ system can be "wrong" = more human
- โ Perfect grammar would feel sterile
Design Analogy:
Infinite Novel : Cyberpunk 2077
=
16mm film : 8K HDR
Lo-fi is the aesthetic choice, not a limitation.
Minimum Specs:
- Python 3.8+
- 8GB VRAM (RTX 3060, M1 Mac 16GB, or equivalent)
- 16GB RAM
- Ollama or LM Studio with Gemma3 1B
Recommended:
- RTX 4070 / M3 Pro 18GB
- 32GB RAM
- SSD for faster model loading
# 1. Clone repo
git clone https://github.com/0penAGI/InfiniteNovel.git
cd InfiniteNovel
# 2. Setup environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Install & setup Ollama or LM Studio
# Ollama:
curl -fsSL https://ollama.com/install.sh | sh
ollama pull gemma3:1b
# LM Studio:
# - Start the local server (OpenAI-compatible) at http://127.0.0.1:1234
# - Load a model (e.g., Gemma3 1B) in LM Studio
# LLM provider switch (in code):
# - Edit infinite_novel.py and set LLM_PROVIDER to "ollama" or "lmstudio"
# - Adjust LLM_MODEL if your LM Studio model name differs
# 5. Run
python infinite_novel.py- Intro sequence plays (press ESC to skip after first viewing)
- Type your first action โ try: "wake up in the network"
- Wait 2-3 seconds โ watch the world generate in real-time
- Keep exploring โ system learns your style after ~10 interactions
| Key | Action |
|---|---|
Type |
Input your action |
Enter |
Submit and generate world response |
Backspace |
Delete characters |
Escape |
Toggle fullscreen |
- Use evocative keywords: "pulse", "titan", "fracture", "light", "network"
- Watch the meters: Collapse/Instability affect generation style
- Build resonance: Positive actions create allies, increase stability
- Let Titan act: System has autonomous events every ~2 minutes
- Embrace glitches: Artifacts are features, not bugs
Strong keywords create narrative threads that persist across generations:
"titan" โ dark, heavy visuals + aggressive music
"pulse" โ rhythmic displacement + energetic soundscape
"fracture" โ edge detection + chaotic audio
"light" โ brightness boost + calm mood
"network" โ grid patterns + ambient dronesThreads decay slowly โ your past actions haunt the present.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Infinite Novel Engine โ
โ (Lo-Fi AI Orchestration) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ
โ โ Story โ โ Quantum โ โ Visual Effects โ โ
โ โ Director โโโโค Memory โโโโค Engine โ โ
โ โ โ โ โ โ โ โ
โ โ โข Arc mgmt โ โ โข State pred โ โ โข Displacement โ โ
โ โ โข Profiling โ โ โข Visual ctx โ โ โข Morphing โ โ
โ โ โข Threading โ โ โข Markov sim โ โ โข Feedback loop โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ โ โ
โโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโ-โโโโค
โ Multi-Modal Generation Layer โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โ Gemma3 โ โ SD 1.5 โ โ Tacotron โ โ Proceduralโ โ
โ โ 1B โ โ Stream โ โ TTS โ โ Music Gen โ โ
โ โ โ โ โ โ โ โ โ โ
โ โ โข 500msg โ โ โข 14step โ โ โข Dub FX โ โ โข Granularโ โ
โ โ memory โ โ โข Morph โ โ โข Delay โ โ โข OTT โ โ
โ โ โข Stream โ โ โข Shader โ โ โ โ โข Reverb โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ World Simulation & Failure State โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Collapse: 0.0 โ 1.0 โ Titan Timer โ Locks โ โ
โ โ Instability tracking โ Autonomous โ Arc-based โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Component | Function | Tech |
|---|---|---|
| PulseCore | Central state manager | PyTorch, NumPy |
| StoryDirector | Narrative AI orchestrator | Gemma3 streaming |
| QuantumMemory | Probabilistic state machine | Weighted Markov + visual ctx |
| FractalMemory | Pattern prediction | LSTM + trig activations |
| MiniUNet | Online frame interpolation | CNN delta prediction |
| Music Engine | Procedural audio synthesis | SciPy signal processing |
Not actual quantum computing โ metaphorical naming for:
- Quantum:
x * cos(w) + sin(w)creates chaotic, non-deterministic behavior - Fractal: Self-similar patterns across time scales (threads decay fractally)
Think of it as poetic variable naming for emergent systems.
| Hardware | FPS | Response Time | Notes |
|---|---|---|---|
| RTX 4090 24GB | 60 | ~1.0s | Overkill but smooth |
| RTX 4070 12GB | 45 | ~1.5s | Sweet spot |
| RTX 3060 8GB | 30 | ~2.5s | Minimum recommended |
| M3 Pro 18GB | 30 | ~2.0s | Tested platform |
| M1 Mac 16GB | 25 | ~3.0s | Playable with patience |
| CPU-only | 15 | ~8.0s | Not recommended |
- โ Streaming diffusion with visible callbacks (feel the generation)
- โ Attention slicing for SD (memory efficiency)
- โ Audio segment caching (reuse similar moods)
- โ Image TTL system (auto-cleanup after 1200ms)
- โ Async model coordination (no blocking)
- โ Dynamic quality adjustment (adapts to hardware)
System auto-saves frames with metadata for future training:
dataset/
session_1704672000/
img_1234567.png # Generated frame
img_1234567.txt # Auto-caption based on threads
img_1234567.json # Metadata (arc, mood, resonance)Use case: Train LoRA adapters on your unique narrative style.
During SD generation, MiniUNet learns to predict frame deltas:
# Predicts: current_frame + delta = next_frame
delta, confidence, temporal_weight = mini_unet(prev, curr)Improves morphing smoothness over session duration.
Titan Timer system creates pressure:
- Every ~2 minutes, Titan acts independently
- Can increase collapse even if player is passive
- Forces reactive gameplay, prevents idle grinding
World collapse affects AI personality:
core.pain_level = (collapse + instability) / 2
action_impact *= (1 + pain_level * 0.5) # Amplifies dramaHigh pain โ more desperate responses, harsher outcomes.
InfiniteNovel/
โโโ infinite_novel.py # Main engine (3000+ lines)
โโโ requirements.txt # Dependencies
โโโ intro.mp4 # Optional intro video
โโโ dataset/ # Auto-captured training data
โ โโโ session_*/
โ โโโ *.png # Frames
โ โโโ *.txt # Captions
โ โโโ *.json # Metadata
โโโ README.md # You are here
Located in infinite_novel.py:
# Visual
ASPECT_RATIO = 3.51 # Cinematic widescreen
SCREEN_WIDTH = 1920 # Auto-adjusts to display
IMAGE_TTL = 1200 # ms before fade
# Text Animation
char_delay = 80 # ms per character
# Dataset Capture
idle_capture_ms = 4000 # Auto-save interval
# SD Generation
num_inference_steps = 14 # Speed vs quality
guidance_scale = 6.6 # Creativity vs coherence
# Music
segment_duration = 2.0-5.0 # Random per segment
pause_duration = 1.0-4.0 # Breathing roomFaster but uglier:
num_inference_steps = 8 # ~1s generation
guidance_scale = 5.0 # More chaosSlower but prettier:
num_inference_steps = 20 # ~3s generation
guidance_scale = 8.0 # More coherentMore glitchy music:
quantum_chaos frequency # line 1050: increase range- Cyberpunk aesthetics โ Blade Runner, Ghost in the Shell
- Glitch art movement โ Rosa Menkman, Takeshi Murata
- Generative music โ Brian Eno's ambient works
- Interactive fiction โ Zork, AI Dungeon, but weirder
- Imperfection as beauty โ celebrate AI artifacts
- Player as co-author โ system adapts to your style
- Emergent narrative โ no scripted paths
- Hardware accessibility โ reject GPU elitism
- Digital ecosystem โ world feels autonomous
"This is not a game trying to be real. It's real trying to be a game."
v0.2 (Q2 2025):
- Save/load session system
- Export story to markdown/video
- Custom model fine-tuning UI
- Thread visualization graph
v0.3 (Q3 2025):
- Multiplayer co-op mode
- Plugin system for custom AIs
- Web deployment (WASM + API)
- Mobile app (iOS/Android)
v1.0 (Q4 2025):
- VR/AR compatibility
- Procedural music stems export
- AI-to-AI narrative mode
- Blockchain integration (controversial but requested)
Vote on features: GitHub Discussions
We welcome contributions! Priority areas:
- ๐ฅ Performance optimization (faster SD callbacks)
- ๐ฅ Alternative model support (Flux.1 Dev, SDXL Turbo)
- ๐ฅ UI/UX improvements (thread visualization, better meters)
- ๐ Documentation (code comments, tutorials)
- ๐ Bug fixes (check Issues tab)
- ๐จ Visual shaders (new post-processing effects)
- ๐งช New AI models (image, audio, text)
- ๐งช Narrative systems (new arc types, mechanics)
- ๐งช Dataset pipelines (improve auto-captioning)
Read: CONTRIBUTING.md for guidelines.
MIT License โ use freely, commercially or not.
- Stability AI โ Stable Diffusion 1.5
- Google โ Gemma3 models
- Coqui AI โ TTS (Tacotron2)
- Ollama / LM Studio โ Local LLM serving
- Pygame community โ Real-time rendering foundation
- Nick Bostrom โ AI alignment concerns (Titan mechanic)
- Ted Chiang โ "Story of Your Life" (narrative determinism)
- William Gibson โ Cyberpunk aesthetics
- Borges โ Infinite libraries and labyrinths
- โญ Star this repo on GitHub
- ๐ฆ Share your generated stories on X with
#InfiniteNovel - ๐ฌ Join discussions โ share gameplay tips, report bugs
- ๐ฐ Sponsor development (GitHub Sponsors coming soon)
Submit your best moments: gallery@0penagi.org
We'll feature standout sessions in the README!
- GitHub Issues: Bug reports & features
- Discussions: Gameplay & modding
- X (Twitter): @0penAGI
- Discord: Coming soon
- ๐ฌ Experimental software โ expect bugs, weirdness, crashes
- ๐ฒ Unpredictable content โ AI can generate anything
- ๐พ Resource intensive โ monitor GPU/RAM usage
- ๐ No content filtering โ use responsibly
- Gemma3 1B can loop on complex queries (just restart)
- SD 1.5 sometimes generates text in images (part of the aesthetic)
- Music can click on CPU-only systems (GPU recommended)
- macOS may require Rosetta for some dependencies
# If running slow, try:
export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 # macOS only
export PYTORCH_ENABLE_MPS_FALLBACK=1 # macOS only
# Or reduce quality:
# In code: num_inference_steps = 8"The network awaits your pulse. What story will you tell?"
Infinite Novel is not a game. It's a collaborative hallucination between you and several neural networks running on consumer hardware. It's messy. It's broken. It's beautiful.
We chose old models because limitations breed creativity. We chose lo-fi because perfection is boring. We chose open-source because AI should belong to everyone.
Your 8GB GPU is enough. Your imagination is the real engine.
Now go break something.
Infinite Novel โ Where every word writes the universe.
Join the experiment: https://github.com/0penAGI/InfiniteNovel
Version: 0.1.0-alpha
Last Updated: January 2025
Author: 0penAGI
Status: Active Development

