Files
blackroad-os-docs/docs/portals/roadglitch.md
Alexa Louise 78141a8da8 docs: add RoadGlitch Gaming Portal specification
- Adaptive difficulty (Flow State Engine)
- AI Game Master for dynamic storytelling
- Procedural content generation (worlds, quests, NPCs)
- No-code game builder with AI assist
- AI NPCs with memory and personality
- Cross-game player profile
- Game definition and scene models
- Genre templates (RPG, platformer, puzzle, etc.)
- Visual scene builder and AI-assisted creation
- Fair play monitoring and content moderation
- Creator revenue share model
- Competitive differentiation vs Roblox, Dreams, RPG Maker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 20:38:48 -06:00

654 lines
21 KiB
Markdown

# RoadGlitch — Gaming Portal
> *"Games that evolve with your play style."*
**Portal ID:** `portal.roadglitch`
**Status:** Planning
**Primary Domain:** Gaming, Game Development, Interactive Entertainment
---
## Overview
RoadGlitch is BlackRoad OS's gaming portal — a platform where games adapt to you, AI creates endless content, and anyone can build interactive experiences without coding. Whether you're a player seeking personalized adventures or a creator building the next indie hit, RoadGlitch is your gateway.
The name "Glitch" represents the beautiful unpredictability of AI-generated content — the emergent gameplay, unexpected stories, and unique moments that arise when games learn and evolve.
---
## Core Value Proposition
### The Problem with Current Gaming
1. **Static content** — Same game, same experience for everyone
2. **Content droughts** — Finish the game, wait years for sequel
3. **High dev barriers** — Making games requires teams and years
4. **Repetitive gameplay** — AI enemies follow predictable patterns
5. **Disconnected experiences** — Each game is a silo
### The RoadGlitch Solution
| Problem | RoadGlitch Solution |
|---------|---------------------|
| Static content | Procedural generation + AI adaptation |
| Content droughts | Infinite AI-generated quests, stories, worlds |
| High dev barriers | No-code game builder with AI assist |
| Repetitive gameplay | Dynamic AI that learns and adapts |
| Disconnected | Unified player profile across experiences |
---
## Platform Pillars
### 1. Play — Adaptive Gaming
Games that learn how you play and evolve accordingly.
### 2. Create — Game Builder
Build games with natural language and visual tools.
### 3. Share — Community Hub
Discover, share, and remix games and content.
### 4. Compete — Tournaments & Leaderboards
Competitive gaming with fair, AI-monitored play.
---
## Key Features
### 1. Adaptive Difficulty (Flow State Engine)
Games that keep you in the zone:
```
Player Performance Tracking:
├── Skill metrics (accuracy, reaction time, strategy)
├── Frustration signals (repeated failures, rage quits)
├── Boredom signals (disengagement, speedrunning)
└── Engagement peaks (flow states, session length)
Dynamic Adjustment:
├── Enemy AI difficulty
├── Puzzle complexity
├── Resource availability
├── Hint frequency
└── Narrative pacing
```
### 2. AI Game Master
A living dungeon master for any game:
```
You: I want to explore the abandoned mine
AI GM: The entrance yawns before you, timbers groaning in the
wind. Your torch flickers, revealing fresh footprints in the
dust — someone's been here recently.
Do you:
A) Follow the footprints cautiously
B) Call out to see if anyone responds
C) Look for another entrance
D) [Custom action]
You: I examine the footprints more closely
AI GM: [Rolls Perception: 14 + 3 = 17, Success]
The prints are uneven — one foot drags slightly. They're
accompanied by smaller, clawed prints. Goblin, likely, and
injured. The trail leads deeper into the darkness, but you
notice a faint shimmer on the wall nearby — could be ore,
could be something else.
```
### 3. Procedural Content Generation
Infinite worlds, quests, and stories:
| Content Type | Generation Method |
|--------------|-------------------|
| **Worlds** | Terrain, biomes, structures from seeds + rules |
| **Quests** | Story templates + context-aware filling |
| **NPCs** | Personality models + dynamic dialogue |
| **Items** | Stat generation + lore creation |
| **Dungeons** | Layout algorithms + encounter balancing |
| **Music** | Adaptive soundtrack generation |
### 4. No-Code Game Builder
Create games with words and visual blocks:
```
You: Create a puzzle platformer where the player controls
gravity. Pixel art style, synth soundtrack, 20 levels
increasing in difficulty.
RoadGlitch: I'll create "Gravity Shift" for you. Here's the plan:
Core Mechanics:
- Tap/click to rotate gravity 90°
- Player must reach the exit portal
- Hazards: spikes, lasers, moving platforms
Art Style: 16-bit pixel art, neon color palette
Music: Synthwave, dynamic intensity
[Preview of Level 1 generated]
Want me to:
1. Generate all 20 levels
2. Adjust the mechanics
3. Change the visual style
4. Add a story/narrative
```
### 5. AI NPCs (Dynamic Characters)
Characters with memory and personality:
```typescript
interface AINPC {
npc_id: string;
name: string;
// Personality (Big Five model)
personality: {
openness: number; // 0-100
conscientiousness: number;
extraversion: number;
agreeableness: number;
neuroticism: number;
};
// Memory
memory: {
player_interactions: Interaction[];
world_events: Event[];
relationships: Relationship[];
goals: Goal[];
};
// Current state
mood: string;
location: string;
current_activity: string;
// Dialogue
voice_style: string;
speech_patterns: string[];
}
```
NPCs remember:
- Previous conversations with the player
- Actions the player has taken
- World events they witnessed
- Their own goals and motivations
### 6. Cross-Game Player Profile
Your gaming identity persists:
```
Player Profile:
├── Play Style Analysis
│ ├── Explorer (85%) — Loves discovering secrets
│ ├── Achiever (70%) — Completes challenges
│ ├── Socializer (45%) — Moderate multiplayer
│ └── Competitor (30%) — Casual competitive
├── Skill Ratings
│ ├── Puzzle Solving: Advanced
│ ├── Reflex/Action: Intermediate
│ ├── Strategy: Expert
│ └── Narrative Engagement: High
├── Preferences
│ ├── Genres: RPG, Puzzle, Indie
│ ├── Art Styles: Pixel art, Hand-drawn
│ ├── Session Length: 30-60 min
│ └── Difficulty: Challenging
└── History
├── Games Played: 47
├── Achievements: 312
├── Creations: 5 games, 23 levels
└── Hours: 847
```
---
## Architecture
### Component Diagram
```
┌─────────────────────────────────────────────────────────────┐
│ ROADGLITCH PORTAL │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Game Client │ │ Builder UI │ │ Community │ │
│ │ (Web/Native)│ │ │ │ Hub │ │
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │ │
│ ┌──────▼─────────────────▼─────────────────▼──────┐ │
│ │ GAME ENGINE │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │ │
│ │ │ Runtime │ │ Physics │ │Renderer │ │ Audio │ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └────────┘ │ │
│ └──────────────────────┬──────────────────────────┘ │
│ │ │
│ ┌──────────────────────▼──────────────────────────┐ │
│ │ AI SYSTEMS │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │ │
│ │ │ Flow │ │Procedural│ │ NPC │ │ Game │ │ │
│ │ │ Engine │ │Generator │ │ AI │ │ Master │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └────────┘ │ │
│ └──────────────────────┬──────────────────────────┘ │
│ │ │
│ ┌──────────────────────▼──────────────────────────┐ │
│ │ PLAYER SERVICES │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │ │
│ │ │ Profile │ │Matchmake│ │ Social │ │Leaderbd│ │ │
│ │ │ Manager │ │ │ │ │ │ │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ └────────┘ │ │
│ └─────────────────────────────────────────────────┘ │
│ │
├──────────────────────────────────────────────────────────────┤
│ GOVERNANCE LAYER │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Cece │ │ Policy │ │ Ledger │ │ Intent │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
└─────────────────────────────────────────────────────────────┘
```
### Game Definition Model
```typescript
interface GameDefinition {
game_id: string;
creator_id: string;
created_at: string;
updated_at: string;
// Metadata
title: string;
description: string;
genre: string[];
tags: string[];
thumbnail_url: string;
// Game configuration
engine_version: string;
config: GameConfig;
// Content
assets: GameAsset[];
scenes: Scene[];
scripts: Script[];
// AI settings
ai_config: {
adaptive_difficulty: boolean;
procedural_content: boolean;
ai_npcs: boolean;
ai_game_master: boolean;
};
// Publishing
status: 'draft' | 'testing' | 'published' | 'archived';
visibility: 'private' | 'unlisted' | 'public';
ratings: Rating[];
play_count: number;
}
interface Scene {
scene_id: string;
name: string;
type: 'level' | 'menu' | 'cutscene' | 'hub';
// Layout
tilemap?: Tilemap;
objects: GameObject[];
// Logic
triggers: Trigger[];
conditions: Condition[];
// Procedural
generation_rules?: GenerationRule[];
}
interface GameObject {
object_id: string;
type: 'player' | 'npc' | 'enemy' | 'item' | 'obstacle' | 'trigger';
position: {x: number; y: number; z?: number};
properties: Record<string, any>;
behaviors: Behavior[];
ai_config?: NPCAIConfig;
}
```
---
## Game Genres & Templates
### Supported Genres
| Genre | AI Features |
|-------|-------------|
| **RPG** | Procedural quests, AI companions, adaptive story |
| **Platformer** | Level generation, difficulty tuning |
| **Puzzle** | Puzzle generation, hint system |
| **Adventure** | Branching narrative, dynamic world |
| **Roguelike** | Infinite dungeons, item generation |
| **Simulation** | NPC behaviors, economy balancing |
| **Shooter** | Enemy AI adaptation, map generation |
| **Strategy** | AI opponents, scenario generation |
### Starter Templates
```
Templates:
├── RPG
│ ├── Classic Fantasy RPG
│ ├── Sci-Fi Adventure
│ ├── Monster Collector
│ └── Dungeon Crawler
├── Platformer
│ ├── Classic Side-Scroller
│ ├── Puzzle Platformer
│ ├── Metroidvania
│ └── Endless Runner
├── Puzzle
│ ├── Match-3
│ ├── Physics Puzzle
│ ├── Logic Puzzle
│ └── Escape Room
├── Adventure
│ ├── Point & Click
│ ├── Visual Novel
│ ├── Walking Sim
│ └── Interactive Fiction
└── Multiplayer
├── Battle Royale
├── Party Game
├── Co-op Survival
└── Competitive Arena
```
---
## Creator Tools
### Visual Scene Builder
```
┌─────────────────────────────────────────────────────────────┐
│ RoadGlitch Builder │ My RPG ▼ │ [Preview] [Publish] │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────────────────────────────┐ │
│ │ Assets │ │ │ │
│ │ ───────── │ │ SCENE EDITOR │ │
│ │ 🧱 Tiles │ │ │ │
│ │ 👤 Chars │ │ [Grid with placed objects] │ │
│ │ 📦 Items │ │ │ │
│ │ ⚡ Effects │ │ │ │
│ │ │ └─────────────────────────────────────┘ │
│ │ ───────── │ │
│ │ + AI Gen │ ┌─────────────────────────────────────┐ │
│ │ + Import │ │ Properties: Selected NPC │ │
│ │ + Draw │ │ ──────────────────────────────────── │ │
│ │ │ │ Name: Merchant Gilda │ │
│ └─────────────┘ │ Personality: Friendly, Shrewd │ │
│ │ Dialogue: [Edit with AI] │ │
│ ┌─────────────┐ │ Behaviors: Trade, Gossip, Quest │ │
│ │ Scenes │ └─────────────────────────────────────┘ │
│ │ ───────── │ │
│ │ 🏠 Town │ ┌─────────────────────────────────────┐ │
│ │ 🌲 Forest │ │ 🤖 AI Assistant │ │
│ │ ⛏ Mine │ │ "Add a secret room behind the │ │
│ │ 🏰 Castle │ │ waterfall with a treasure chest" │ │
│ │ + New │ └─────────────────────────────────────┘ │
│ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘
```
### AI-Assisted Creation
```
You: Create a boss fight for the end of the forest level
RoadGlitch: I'll design "The Forest Guardian" boss:
Visual: Ancient treant, 3x player size, glowing green eyes
Health: 500 HP (scales with player level)
Phases:
Phase 1 (100-60% HP):
- Root Slam: Ground pound, creates shockwave
- Vine Whip: Sweeping attack, medium range
- Summon Saplings: 3 small enemies
Phase 2 (60-30% HP):
- All Phase 1 attacks, faster
- Thorn Barrage: Ranged projectile spread
- Healing Bloom: Recovers 50 HP over 5s (interruptible)
Phase 3 (30-0% HP):
- Enraged state, all attacks faster
- Gaia's Wrath: Full-screen attack, safe zones marked
- Desperation: Low HP triggers continuous vine attacks
Arena: Circular clearing, destructible trees for cover
Music: Orchestral, intensifies with each phase
[Preview boss fight]
Want me to adjust difficulty, add mechanics, or change the theme?
```
---
## Governance & Safety
### Content Moderation
```yaml
policies:
- scope: roadglitch.content.publish
rules:
- condition: "contains_prohibited_content"
action: deny
reason: "Violates content guidelines"
- condition: "age_rating > creator_verified_age"
action: deny
reason: "Creator cannot publish mature content"
- scope: roadglitch.ai.generate
rules:
- condition: "prompt contains violence_extreme"
action: transform
transform_fn: "moderate_violence_level"
- scope: roadglitch.multiplayer.chat
rules:
- condition: "message contains harassment"
action: deny
reason: "Chat message blocked"
```
### Fair Play Monitoring
```json
{
"event_id": "evt-20251130-fair001",
"agent_id": "roadglitch.anticheat.v1",
"tool": "monitor",
"action": "flag",
"metadata": {
"player_id": "user:xyz",
"game_id": "competitive-shooter",
"violation_type": "suspicious_accuracy",
"confidence": 0.87,
"action_taken": "flagged_for_review"
}
}
```
---
## API Endpoints
### Games
```bash
# List games
GET /portal/roadglitch/games?genre=rpg&sort=popular
# Get game details
GET /portal/roadglitch/games/{game_id}
# Create game
POST /portal/roadglitch/games
{
"title": "My Adventure",
"template": "classic-rpg",
"ai_config": {
"adaptive_difficulty": true,
"procedural_content": true
}
}
# Update game
PATCH /portal/roadglitch/games/{game_id}
```
### Play Sessions
```bash
# Start session
POST /portal/roadglitch/sessions
{
"game_id": "game-123",
"save_id": "save-456" # Optional, for continuing
}
# Get session state
GET /portal/roadglitch/sessions/{session_id}
# Submit player action
POST /portal/roadglitch/sessions/{session_id}/actions
{
"action_type": "move",
"data": {"x": 10, "y": 5}
}
# AI Game Master interaction
POST /portal/roadglitch/sessions/{session_id}/gm
{
"message": "I search the room for traps"
}
```
### Builder
```bash
# Generate content
POST /portal/roadglitch/builder/generate
{
"type": "level",
"prompt": "A spooky haunted mansion with 5 rooms",
"style": "pixel-art"
}
# Create NPC
POST /portal/roadglitch/builder/npcs
{
"name": "Elder Sage",
"personality": "wise, mysterious, helpful",
"role": "quest_giver",
"dialogue_style": "cryptic riddles"
}
# Test game
POST /portal/roadglitch/games/{game_id}/test
```
---
## Pricing Tiers
| Tier | Price | Features |
|------|-------|----------|
| **Free** | $0/mo | Play free games, create 1 game, basic AI |
| **Player** | $10/mo | All games, cloud saves, no ads |
| **Creator** | $25/mo | Unlimited games, full AI generation, publish |
| **Pro** | $50/mo | Monetization, analytics, priority features |
| **Studio** | Custom | Team tools, white-label, custom AI training |
### Creator Revenue Share
- Creators earn 70% of revenue from their games
- Revenue sources: Premium games, in-game purchases, tips
- Monthly payouts via Stripe
---
## Roadmap
### MVP (Phase 1)
- [ ] Game player (web-based)
- [ ] 3 game templates
- [ ] Basic procedural generation
- [ ] Simple builder
### Beta (Phase 2)
- [ ] AI Game Master
- [ ] Adaptive difficulty
- [ ] 10+ templates
- [ ] Community hub
### v1.0 (Phase 3)
- [ ] Full NPC AI system
- [ ] Multiplayer support
- [ ] Mobile apps
- [ ] Creator monetization
### Future
- [ ] VR/AR games
- [ ] AI-generated 3D worlds
- [ ] Esports integration
- [ ] Game streaming
---
## Competitive Differentiation
| Feature | RoadGlitch | Roblox | Dreams | RPG Maker |
|---------|------------|--------|--------|-----------|
| AI Game Master | ✅ Yes | ❌ No | ❌ No | ❌ No |
| Adaptive difficulty | ✅ Advanced | ❌ No | ❌ No | ❌ No |
| Procedural content | ✅ AI-powered | ❌ Manual | ❌ Manual | ❌ Plugins |
| No-code builder | ✅ + AI assist | ✅ Lua needed | ✅ Visual | ⚠️ Events |
| AI NPCs | ✅ Memory + personality | ❌ Scripted | ❌ Scripted | ❌ Scripted |
| Cross-game profile | ✅ Yes | ⚠️ Limited | ❌ No | ❌ No |
---
## References
- [Lucidia Portal](./lucidia.md)
- [RoadWork Portal](./roadwork.md)
- [RoadView Portal](./roadview.md)
- [Architecture Overview](../meta/vision/architecture.md)