A high-stakes diplomatic crisis mediation simulation game where players assume the role of Qathar's Foreign Minister navigating the Strait of Haruz tanker seizure crisis. Make critical decisions that shape the fate of regional stability.
CrisisSim: RedLine is a narrative-driven diplomatic simulation where every choice matters. As Qathar's Foreign Minister, you must balance competing interests between Ivaran (revolutionary theocracy), Iskar (Western-backed democracy), and international stakeholders to prevent escalation into full-scale military conflict.
The Strait of Haruz tanker seizure has plunged the region into crisis. Ivaran sponsors the Levara Brigades, while Iskar conducts covert operations to delay Project Saffron. With nuclear thresholds being crossed and civilian casualties mounting, your diplomatic interventions will determine whether peace holds or conflict spirals.
- 3-Turn Negotiation System: Make strategic diplomatic moves across three critical turns
- Dynamic AI Responses: GPT-powered NPC reactions that adapt to your choices
- 6 Diplomatic Tools: From secret back-channels to public ultimatums
- 5 Pressure Intensities: From exploratory contact to high-risk ultimatum
- Multiple Stakeholders: Ivaran, Iskar, Atlantic Pact, UN Security Council, Haruz Energy Consortium
- Real-time Meter System: Track escalation, process trust, nuclear risk, and bilateral relations
- Player Profile Tracking: Your mediation style evolves based on decision patterns
- Crisis Injection Events: Random events that escalate or provide opportunities
- Security Council Vote: Final decision with four voting options
- Multiple Endings: From fragile pause to partial breakthrough
- Procedural Ambient Audio: Web Audio API-generated tension soundtrack
- Interactive Sound Effects: Click feedback, alerts, and success tones
- Animated SVG Conflict Map: Visual representation of regional dynamics
- Voice Command Input: Speak your diplomatic actions
- Collapsible Dashboard Panels: Customize your view
- Operations Room Aesthetic: Dark theme with tactical color coding
- Real-time Status Bar: Live clock, meter indicators, volume control
- Responsive Design: Adapts to various screen sizes
- Monospace Typography: Military/tactical interface feel
| Technology | Purpose |
|---|---|
| React 18 | UI framework |
| TypeScript | Type safety |
| Vite | Build tool |
| Tailwind CSS | Styling |
| Zustand | State management |
| Web Audio API | Procedural audio generation |
| Web Speech API | Voice commands |
| OpenAI GPT-4 | AI-powered NPC responses |
src/
โโโ components/
โ โโโ ActionBuilder.tsx # Diplomatic action selection UI
โ โโโ CallerAvatar.tsx # Animated phone call avatars
โ โโโ ConflictMap.tsx # SVG conflict visualization
โ โโโ ConflictMapModal.tsx # Full-screen map overlay
โ โโโ ConflictMapButton.tsx # Map toggle button
โ โโโ MeterBar.tsx # Meter visualization
โ โโโ OpsComponents.tsx # Reusable ops-themed components
โ โโโ OrianPanel.tsx # AI advisor counsel
โ โโโ ...
โโโ pages/
โ โโโ StartScreen.tsx # Landing page
โ โโโ CountryProfileScreen.tsx # Qathar profile selection
โ โโโ ScenarioBrief.tsx # Crisis briefing
โ โโโ PhoneCallScene.tsx # Pre-negotiation calls
โ โโโ CrisisInjectionAlert.tsx # Crisis event popups
โ โโโ MainNegotiationScreen.tsx # Core gameplay
โ โโโ SCVoteScreen.tsx # Security Council vote
โ โโโ FinalDebrief.tsx # Mission outcome
โโโ store/
โ โโโ gameStore.ts # Zustand game state
โโโ lib/
โ โโโ audioEngine.ts # Procedural audio
โ โโโ minimaxClient.ts # OpenAI API client
โ โโโ utils.ts # Utility functions
โโโ types/
โ โโโ index.ts # TypeScript definitions
โโโ App.tsx # Root component
- Start Screen โ Launch the simulation
- Profile Selection โ Configure Qathar's national profile
- Scenario Brief โ Receive crisis intelligence
- Phone Calls โ Initial contact with Ivaran & Iskar
- Turn 1-3 โ Execute diplomatic actions
- Security Council Vote โ Final strategic decision
- Debrief โ Review your mediation performance
Build actions using three parameters:
| Parameter | Options |
|---|---|
| Tool | BACK-CHANNEL, ECONOMIC LEVERAGE, MULTILATERAL FRAMEWORK, HUMANITARIAN CORRIDOR, PUBLIC STATEMENT, SECURITY COUNCIL |
| Intensity | EXPLORATORY CONTACT, SOFT PRESSURE, DIRECT PRESSURE, HARD PRESSURE, ULTIMATUM |
| Target | IVARAN, ISKAR, ATLANTIC PACT, SECURITY COUNCIL, HARUZ ENERGY CONSORTIUM, ATOMIC OVERSIGHT MISSION |
| Meter | Range | Description |
|---|---|---|
| ESCALATION | 0-100 | Military conflict risk |
| PROCESS TRUST | 0-100 | Confidence in negotiation |
| CIVILIAN PRESSURE | 0-100 | Humanitarian crisis level |
| NUCLEAR RISK | 0-100 | Project Saffron threat |
| IVARAN-QATHAR | 0-100 | Bilateral relationship |
| QATHAR-ATLANTIC | 0-100 | Alliance strength |
- PRESSURE-FIRST: High-risk ultimatum user
- BACK-CHANNEL SPECIALIST: Private diplomacy expert
- MULTILATERALIST: International framework builder
- ECONOMIC PRAGMATIST: Trade leverage tactician
- INCREMENTALIST: Slow, steady progress maker
Create a .env.local file:
VITE_OPENAI_API_KEY=your-openai-api-key-here- Visit OpenAI Platform
- Create an account or sign in
- Generate a new API key
- Add credits to your account
# Clone the repository
git clone <repository-url>
cd crisisim-redline
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run buildEdit src/types/index.ts:
export type DiplomaticTool =
| 'BACK-CHANNEL'
| 'ECONOMIC LEVERAGE'
| 'NEW_TOOL' // Add here
// ...Edit CRISIS_INJECTIONS in src/types/index.ts
Modify system prompts in src/lib/minimaxClient.ts
The game features procedurally generated audio using Web Audio API:
- Ambient Drone: Low-frequency tension base
- Rhythmic Pulse: Heartbeat-like heartbeat
- Static Layer: Distant radio static
- Sound Effects: Click, alert, success tones
Audio automatically adjusts to scene context:
- Normal mode: 30% volume
- Crisis mode: 50% volume
- Phone call mode: 8% volume
| Outcome | Description |
|---|---|
fragile_pause |
Active conflict avoided, tensions remain |
managed_stalemate |
Limited progress, process maintained |
partial_breakthrough |
Meaningful framework established |
qathar_sidelined |
Lost credibility with key stakeholders |
escalation_spiral |
Military conflict begun |
Final debrief includes:
- Your dominant diplomatic style
- Risk tolerance assessment
- Red lines crossed
- Public vs. private exposure
- Strategic recommendations
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - See LICENSE file for details
- Protect Your Back-Channel: Once burned, it cannot be restored
- Watch Your Exposure: Public actions limit future deniability
- Balance Atlantic Ties: Your security guarantee is non-negotiable
- Mind the Haruz Stake: Your 23% economic stake means you feel the pain too
- Time Matters: Ultimatums can trigger breakthroughs or walkouts
CrisisSim: RedLine โ Where every diplomatic action has consequences.