Inspiration
The inspiration for Shadow Duel Arena came from a frustrating experience we've all had: waiting endlessly for opponents in multiplayer games. Whether it's a dead lobby at 3 AM or a niche game with a small player base, the "searching for players..." screen has killed countless gaming sessions. We asked ourselves: What if every battle you ever played could become an opponent for someone else? This led us to the revolutionary Shadow System - a technology that records every battle and transforms it into an intelligent opponent. No more waiting, no more dead lobbies, just instant, engaging battles 24/7.
What it does
- Solves Real Problem: No waiting for opponents
- Highly Replayable: New shadows constantly generated
- Community-Driven: Everyone's gameplay impacts others
- Both Async AND Sync: Works solo or multiplayer
- Polished UX: Smooth animations, clear feedback
Shadow Duel Arena is a turn-based Player vs Player battle game built natively for Reddit that solves the multiplayer waiting problem through innovative Shadow technology:
🎮 Core Gameplay:
- Choose from 6 unique characters (Mage, Knight, Ranger, Assassin, Tank, Healer)
- Battle using 12 strategic abilities with energy management
- Turn-based (10-turn limit) combat with 10-second turns and status effects
- Progress through Bronze → Silver → Gold → Platinum → Diamond → Legend ranks
👻 Shadow System Innovation:
- If anyone is online then opponent player is selected based on the matching level, ranks etc.
- Every battle you play gets recorded as a "Shadow"
- Other players can fight your Shadow when you're offline
- You never know if you're fighting a real player or a Shadow until after
- Creates instant matchmaking with real human strategies
🐉 Community Events:
- Raid Boss mode when 10+ players are online
- Cooperative battles against 5000 HP dragons
- Shared rewards for all participants
🏆 Progression & Competition:
- 30+ achievements to unlock
- Global, weekly, and monthly leaderboards
- Daily challenges for bonus rewards
- Character unlocks through levelling
🎮 How to Play
For Players
- Start: Click "Enter Arena" on the splash screen
- Choose Mode:
- Quick Match: Casual battles (no rank changes)
- Ranked Battle: Competitive (earn/lose rank points)
- Raid Boss: Cooperative (active when 10+ players online, raid against boss)
- Select Character: Choose your fighter based on playstyle
- Fight: Use abilities strategically
- Energy management is key
- Balance offensive and defensive moves
- Watch for status effects
- Win Rewards: Earn XP, coins, and rank points
- Level Up: Unlock new characters and abilities
- Join Raids: When 10+ players online, join epic boss battles
Battle Mechanics
- Energy: Use to save HP
- HP(Hit Points): Character-specific starting values
- Abilities: Cost energy and some have cooldowns
- Status Effects: Poison, defense buffs, berserk mode
- Turn Timer: 10 seconds (lose -5 HP if you don't act in time)
- Turn: Total 10 turns
Battle Winning Conditions
- Battles have a 10 turn limit. If both players turns reached 10, then the player with higher HP wins; if exactly equal, it's a draw.
- Player who loses all HP first clearly loses.
How we built it
Frontend Architecture:
- React 19 + TypeScript for type-safe, component-based UI
- 9 React Components handling different game screens
- Real-time polling every 5 seconds for live updates
- Tailwind CSS for responsive, mobile-first design
- Smooth animations and visual feedback throughout
Backend Architecture:
- Express.js server with RESTful API design
- Devvit API integration for Reddit platform features
- Hybrid storage system:
- Redis for real-time data (active games, online players, raid status)
- KV Store for persistent data (profiles, shadows, leaderboards)
- Battle Engine with complex turn-based combat logic
- Matchmaking Algorithm that intelligently selects opponents
Kiro: Kiro integration for enhanced development workflow
Shadow System Implementation:
// Every battle creates a shadow
const shadow = {
playerId: battle.playerId,
character: battle.character,
moves: battle.moveHistory,
rank: player.rank,
timestamp: Date.now(),
expiresAt: Date.now() + (7 * 24 * 60 * 60 * 1000) // 7 days
};
await storeShadow(shadow);
Matchmaking Logic:
- Check for online players within ±50 rank points
- If found → Real-time PvP battle
- If not found → Find Shadow near your rank (±100 points)
- If no Shadow → Generate training opponent
- Record your battle as a new Shadow for others
Performance Optimizations:
- Auto-cleanup of expired data (5-min game TTL, 7-day shadow TTL)
- Efficient database queries with proper indexing
- Debounced user inputs and optimized re-rendering
- Handles 1000+ concurrent players
Challenges we ran into
1. Shadow Replay Accuracy Creating a system that could perfectly replay human strategies was complex. We had to:
- Record not just moves, but timing, character state, and decision context
- Handle edge cases where recorded moves might be invalid in new contexts
- Add slight randomization to prevent predictable patterns
- Balance authenticity with gameplay variety
2. Real-time Synchronization Coordinating between real-time PvP and Shadow battles required:
- Complex state management across multiple storage layers
- Handling race conditions when players join/leave
- Ensuring consistent game state across all clients
- Managing TTLs and cleanup without affecting active games
3. Raid Boss Coordination Implementing cooperative multiplayer events presented challenges:
- Detecting when 10+ players are online simultaneously
- Synchronizing attacks from multiple players
- Fair reward distribution
- Handling players joining/leaving mid-raid
4. Mobile Optimization Making the game work perfectly on Reddit mobile required:
- Responsive design that works in Reddit's iframe
- Touch-optimized controls for abilities
- Readable text and buttons on small screens
- Smooth animations that don't lag on mobile devices
5. Balancing Game Mechanics Creating engaging combat required extensive balancing:
- 12 abilities with different costs, cooldowns, and effects
- 6 characters with unique stats and playstyles
- Status effects that add depth without complexity
- Progression that feels rewarding but not grindy
Accomplishments that we're proud of
🚀 Technical Innovation:
- Shadow System - A completely novel approach to multiplayer matchmaking
- Hybrid Architecture - Seamlessly blends real-time and asynchronous gameplay
- Zero Downtime - Players can always find a battle instantly
- Scalable Design - Handles 1000+ concurrent players efficiently
🎮 Gameplay Excellence:
- 30+ Achievements with meaningful progression
- 6 Unique Characters each with distinct playstyles
- 12 Strategic Abilities creating deep combat variety
- Multiple Game Modes (Quick Match, Ranked, Raid Boss)
🏆 Community Features:
- Global Leaderboards with weekly/monthly competitions
- Raid Boss Events bringing players together
- Daily Challenges keeping engagement high
- Achievement System rewarding different playstyles
💻 Code Quality:
- 100% TypeScript - Fully type-safe codebase
- Comprehensive Error Handling - Graceful failure recovery
- Mobile-First Design - Perfect Reddit mobile experience
- Production Ready - No placeholders, fully implemented
📊 Performance Metrics:
- <100ms average API response time
- 5-second real-time update intervals
- 7-day shadow retention for freshness
- Auto-cleanup prevents database bloat
- Lazy loading components
- Optimized re-rendering
What we learned
Game Design Insights:
- Instant gratification is crucial for casual gaming
- Community-driven content creates more engagement than AI
- Hybrid experiences can solve traditional multiplayer problems
- Progressive unlocks keep players coming back
Technical Learnings:
- Real-time systems require careful state management
- Storage layer design impacts scalability significantly
- Mobile optimization can't be an afterthought
- Error handling is critical for user experience
Reddit Platform Specifics:
- Devvit's capabilities enable rich interactive experiences
- Reddit's audience appreciates community-driven features
- Mobile usage dominates, requiring responsive design
- Integration possibilities with Reddit's social features
Kiro's capabilities: Kiro dramatically accelerated development of Shadow Duel Arena by automating repetitive tasks, suggesting optimal patterns, and ensuring consistency across the codebase. The time saved allowed us to build a complete, polished game with 30+ files in record time.
What's next for Shadow Duel Arena
Short-term Enhancements:
- Replay System - Watch your best battles
- Spectator Mode - Watch live battles from leaderboard
- Tournament Mode - Organized competitive events
- Character Skins - Cosmetic customization options
** 🎯 Future Enhancements:**
- Clan/guild system
- Voice chat for raids
Platform Expansion:
- Mobile App - Standalone mobile experience
- Cross-Platform - Play across Reddit and mobile
- API Integration - Third-party tools and stats
- Esports Features - Professional tournament support
Advanced Gameplay:
- New Characters - Expand roster with unique abilities
- Environmental Effects - Dynamic battle conditions
- Team Battles - 2v2 and 3v3 modes
- Campaign Mode - PvE story content
The Shadow System has proven that innovative approaches to traditional problems can create entirely new gaming experiences. We're excited to continue pushing the boundaries of what's possible in browser-based, community-driven gaming.
Built With
- devvit-api
- eslint
- express.js
- kv-store
- node.js
- prettier
- react
- reddit-devvit
- reddit-platform
- redis
- tailwindcss
- typescript
- vite
Log in or sign up for Devpost to join the conversation.