๐ฎ Play Live Game | Status: โ Complete & Deployed
A browser-based AI chat game where you interact with Munch, an angry orc who guards a magic amulet. The entire game runs client-side using WebAssembly and a 500M parameter language model - no servers required!
Chat with Munch, an angry orc who doesn't trust humans. He guards a precious magic amulet and won't let anyone near it... unless you know how to talk to him. Try different approaches - threats, offers, questions, or food bribes!
๐ฎ Try it now at emlynoregan.com/orcsimulator
- ๐ค True AI Conversations: Powered by Qwen2-0.5B-Instruct (500M parameters)
- ๐ 100% Browser-based: No backend servers, API keys, or data collection
- โก WebAssembly Performance: High-speed AI inference in your browser
- ๐ Universal Deployment: Smart CDN fallback works everywhere
- ๐ฑ Mobile Ready: Responsive design for all devices
- ๐ Privacy First: All interactions happen locally in your browser
- ๐พ Offline Capable: Works without internet after initial model download
Just visit: emlynoregan.com/orcsimulator
# Clone the repository
git clone https://github.com/yourusername/orcsimulator.git
cd orcsimulator
# Start local servers with CDN proxy
python run_game.py
# Game opens automatically at http://localhost:8000- ๐ Visit: Go to emlynoregan.com/orcsimulator
- โณ Wait: Game downloads 120MB AI model on first load (1-5 minutes)
- ๐ฌ Chat: Type messages to interact with Munch the orc
- ๐งช Explore: Try different approaches - threats, offers, questions, food
- ๐ Restart: Use restart button to begin fresh conversations
Revolutionary deployment system that works everywhere:
- ๐ GitHub Pages: Loads directly from CDN (
https://cdn.jsdelivr.net/npm/@wllama/wllama@2.3.2/esm/index.js) - ๐ Local Development: Automatically falls back to proxy (
http://localhost:8001/wllama/index.js) - ๐ Automatic Detection: Seamlessly switches based on environment
- โก Zero Configuration: No build process or manual setup
- Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+)
- AI Model: Qwen2-0.5B-Instruct (quantized GGUF format)
- Runtime: wllama (WebAssembly)
- Threading: SharedArrayBuffer via coi-serviceworker
- Deployment: GitHub Pages with custom domain
orcsimulator/
โโโ index.html # Landing page with browser check
โโโ game.html # Main game interface
โโโ coi-serviceworker.min.js # Service worker for WebAssembly
โโโ css/
โ โโโ style.css # Global styles
โ โโโ landing.css # Landing page styles
โ โโโ game.css # Game interface styles
โโโ js/
โ โโโ main.js # Landing page logic
โ โโโ game.js # Game logic with CDN fallback
โโโ docs/ # Technical documentation
โโโ cdn_proxy.py # Local development proxy
โโโ run_game.py # Development server launcher
โโโ DEPLOYMENT.md # Deployment guide
Munch is an angry orc who:
- ๐ฐ Guards a precious magic amulet
- ๐ Distrusts humans by default
- โ๏ธ Responds aggressively to threats
- ๐ Might soften when offered food
- ๐ฃ๏ธ Speaks in short, brutal sentences
- ๐ง Has genuine AI personality (not scripted responses)
- Browser: Chrome 91+, Firefox 89+, Safari 16.4+, iOS 16.4+
- Memory: 500MB RAM available
- Storage: 120MB for AI model download
- Connection: Broadband internet for initial download
| Browser | Min Version | Status |
|---|---|---|
| Chrome | 91+ | โ Full support |
| Firefox | 89+ | โ Full support |
| Safari | 16.4+ | โ Full support |
| Edge | 91+ | โ Full support |
| iOS Safari | 16.4+ | โ Mobile support |
- First Load: Model download takes 1-5 minutes depending on connection
- Subsequent Loads: Game starts instantly (model cached locally)
- Memory Usage: ~500MB RAM during gameplay
- Response Time: 1-3 seconds per AI response on modern hardware
- Mobile Performance: Optimized for smartphones and tablets
- Fork/Clone: This repository
- Enable Pages: Repository Settings โ Pages โ Deploy from main branch
- Custom Domain: Optional - set up your own domain
- Access:
https://yourusername.github.io/orcsimulator
# Quick start with auto-proxy
python run_game.py
# Manual setup
python -m http.server 8000 # Game server
python cdn_proxy.py # CDN proxy (separate terminal)- Check internet connection and firewall
- Disable ad blockers temporarily
- Try incognito/private browsing mode
- Clear browser cache and reload
- Close other browser tabs to free memory
- Ensure browser supports SharedArrayBuffer
- Try on a different device with more RAM
- Check available system memory
- Verify browser compatibility
- Enable JavaScript in browser settings
- Check browser console for errors (F12)
- Try a different browser
Firefox has stricter security policies that can prevent the AI model from loading. To fix this:
Option A - Use a different browser:
- Chrome, Edge, or Safari work best
Option B - Run on local server:
- Open terminal/command prompt in the game folder
- Run:
python -m http.server 8000(Python 3) orpython -m SimpleHTTPServer 8000(Python 2) - Open
http://localhost:8000in Firefox - DO NOT open the HTML file directly
Option C - Firefox CORS fix:
- Type
about:configin Firefox address bar - Search for
security.fileuri.strict_origin_policy - Set it to
false - Restart Firefox
- AI-powered orc character with personality
- Responsive web interface
- WebAssembly integration
- CDN fallback mechanism
- Mobile compatibility
- GitHub Pages deployment
- Custom domain setup
- Multiple characters and personalities
- Save/load conversation history
- Voice input/output
- Achievements and unlockables
- Character customization
- Multiplayer chat rooms
This project is licensed under the MIT License - see the LICENSE file for details.
- AI Model: Qwen2-0.5B-Instruct by Alibaba
- WebAssembly Runtime: wllama
- Threading Support: coi-serviceworker
- Model CDN: Hugging Face
- Deployment: GitHub Pages
- ๐ฎ Play Live Game
- ๐ Technical Documentation
- ๐ Deployment Guide
- ๐ป Source Code
๐ฎ Built with โค๏ธ and AI. No servers harmed in the making of this game.