An advanced interactive text-based RPG story system with AI-powered narrative generation, multiplayer support, and rich gameplay mechanics.
- Interactive Text Adventures with branching narratives
- AI-Powered Story Generation using Claude, DeepSeek, and web enhancement
- Advanced Combat System with timing-based mechanics, magic, and equipment
- Real-time Multiplayer with WebSocket support and voting systems
- Rich Terminal UI with ASCII art, animations, and visual effects
- Multiple AI Models for diverse story generation
- Adaptive Difficulty that learns from player behavior
- Web-Enhanced Stories using real-time content fetching
- Player Profiling for personalized experiences
- Dynamic Choice Generation based on player preferences
- Equipment System with weapons, armor, and durability
- Magic & Spells with mana management and cooldowns
- Character Progression with stats, levels, and skills
- Quest System with main, side, and daily quests
- Settlement Building and NPC relationships
- Shared Story Sessions with up to 4 players
- Democratic Voting for story choices
- Real-time Chat and player interaction
- Session Management with host controls
- Spectator Mode for observers
- Rich Console Interface with blessed.js terminal UI
- ASCII Art and visual effects
- Sound Effects and animations
- Health/Mana Bars with visual indicators
- Inventory Management with visual displays
- Node.js >= 16.0.0
- npm >= 8.0.0
# Install dependencies
npm install -i requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys
# Start the game
npm startnpm -i
# Generate different story types
npm run generate:random # Random interesting story
npm run generate:mystery # Detective/puzzle story
npm run generate:horror # Horror/thriller story
# Generate massive open worlds
npm run generate:fantasy # Fantasy kingdom with quests
npm run generate:space-station # Space station adventure
# Play generated stories
npm run play:latest
python run.pyCreate a .env file with your configuration:
# API Keys
CLAUDE_API_KEY=your_claude_api_key
DEEPSEEK_API_KEY=your_deepseek_api_key
GROQ_API_KEY=your_groq_api_key
# Server Settings
PORT=3000
NODE_ENV=development
# Story Settings
DEFAULT_STORY_LENGTH=20
CONTENT_RATING=PG-13
ENABLE_WEB_ENHANCEMENT=true
# Combat Settings
COMBAT_ANIMATION_SPEED=60
TIMING_BAR_DIFFICULTY=normal-
Start a new adventure:
npm start
-
Navigate the story using numbered choices (1-9)
-
Use hot keys:
v- View inventoryq- Quest logs- Player statsh- Help
-
Timing Bar Combat: Press ENTER when the marker hits the optimal zones
- ๐ฏ Perfect Hit: 2x damage (critical hit!)
- โ Excellent: 1.5x damage (bonus damage)
โ ๏ธ Good Hit: 1.2x damage (normal damage)- โ Poor Timing: 0.5x damage (reduced damage)
-
ATK/DEF System: Your attack vs enemy defense determines damage
-
Item Effects: Use scrolls and potions to boost stats permanently
-
Equipment System: Weapons, armor, and magical items
-
Magic System: Cast spells using mana
-
Start server:
npm run server
-
Players connect via WebSocket
-
Host starts story and players vote on choices
-
Democratic decision making with real-time voting
javascript-distributed-story/
โโโ lib/ # Core library modules
โ โโโ Logger.js # Logging system
โ โโโ ConfigManager.js # Configuration management
โ โโโ ErrorHandler.js # Error handling
โ โโโ EnhancedCombatSystem.js # Combat mechanics
โ โโโ EnhancedUI.js # User interface
โ โโโ AdaptiveAI.js # AI learning system
โ โโโ GameplayFeatures.js # Quests, NPCs, settlements
โ โโโ MultiplayerSystem.js # Multiplayer support
โโโ config/ # Configuration files
โโโ stories/ # Generated stories
โโโ external/ # External integrations
โโโ tests/ # Test files
โโโ docs/ # Documentation
npm run generate # Generate new story
npm run generate:web # Generate with web enhancement
npm run generate:rich # Generate rich dynamic storynpm run play # Play interactive story
npm run play:latest # Play most recent story
npm run play:choice # Play with choice selectionnpm run combat:demo # Show combat bar visualization
npm run combat:simulate # Simulate combat sequencenpm run dev # Start in development mode
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm run format # Format with Prettier
npm run build # Build and validate
npm run test # Run tests
npm run test:coverage # Run tests with coverage# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with โค๏ธ for interactive storytelling enthusiasts
Transform your imagination into playable adventures!