About
Rivals is a revolutionary Augmented Reality (AR) multiplayer shooter that transforms the real world into a competitive gaming arena. This isn't just a mobile game—it's a sophisticated fusion of Unity AR Foundation, blockchain economics, and AI-driven gameplay that creates a persistent, location-based gaming ecosystem where players compete for cryptocurrency rewards.
The project represents the next evolution of mobile gaming, combining the immersive AR experience of apps like Pokémon GO with the competitive intensity of first-person shooters, all powered by Web3 tokenomics that give real monetary value to in-game achievements.
Key Features:
- Zombies patrol randomly within your detected space - They scream when they first spot you (Alert state) - They chase aggressively using pathfinding around real furniture/obstacles - They attack when within 1.5 meters - They react to damage with hit animations - Full death sequence with cleanup
Unity AR Game Architecture:
Core AR Foundation Implementation
The Unity application leverages AR Foundation to create a sophisticated augmented reality experience:
1. Dynamic Environment Mapping
- ARPlaneManager: Real-time detection of horizontal and vertical surfaces (floors, walls, tables) - ARNavMeshBuilder: Automatically generates navigation meshes from detected AR planes, allowing AI enemies to pathfind through your real environment - ARFeatheredPlaneMeshVisualizerCompanion: Visualizes detected surfaces with smooth, feathered edges for better user feedback - ARRaycastManager: Enables precise interaction with the real world for object placement and shooting mechanics
2. Advanced AI System
The game features a sophisticated 6-state AI system for zombie enemies:
States: Patrol → Alert → Chase → Attack → Hit → Death
ZombieAI Components:
- ZombieVision: Field-of-view detection (120° cone, 8-12m range) with line-of-sight checking - ZombieMovement: NavMesh-based pathfinding that respects real-world obstacles - ZombieAttack: Melee combat system with range validation and damage dealing - ZombieHealth: Health management with visual feedback and death animations - ZombieSpawner: Dynamic enemy spawning system that considers AR plane availability
3. Shooting & Combat Mechanics
- ZombieShooter: Screen-center aiming with crosshair targeting - Bullet System: Physics-based projectiles with collision detection - CrosshairController: Dynamic UI that changes color based on game mode - PlayerHealth: Damage feedback with screen flash, health bar, and audio cues
4. Location-Based Features
- LocationMonitor: GPS tracking for player movement and trap discovery - Real-time location updates sent to server every few seconds - Proximity detection for discovering other players' traps - Geofencing for trap activation (within ~10 meters)
Blockchain Integration and Smart Contract Architecture
The game uses a custom ERC-20 token contract (`RivalsToken.sol`) deployed on multiple chains:
Supported Blockchains:
- Flow Testnet (Chain ID: 545) - Chiliz Spicy Testnet (Chain ID: 88882) - Local Anvil (for development)
Token Economics ($RIVAL):
```solidity // Rewards killMonster() → +1 RIVAL token per zombie kill
// Penalties
dieByMonster() → -20% of current balance dieByTrap() → -20% transferred to trap owner
// Costs
placeTrap() → -1 RIVAL token ```
Smart Contract Functions:
1. `killMonster(address)`: Mints 1 RIVAL token when player kills a zombie 2. `dieByMonster(address)`: Burns 20% of player's tokens when killed by AI 3. `dieByTrap(address, address)`: Transfers 20% from victim to trap owner 4. spend(address, uint256)`: Burns tokens for trap placement
Web3 Infrastructure
Authentication & Wallet Management:
- Privy Provider: Web3 authentication with social login support - WalletConnect: Mobile wallet integration - Cross-chain support: Automatic chain switching via Wagmi
Real-time Blockchain Integration:
- Viem: Modern Ethereum client for contract interactions - Automatic transaction handling: Server manages all blockchain calls - Balance tracking: Real-time token balance updates - Transaction receipts: Full on-chain verification
Database & Server Architecture**
API Endpoints:
1. `/api/movement` (Location Tracking)
- Receives GPS coordinates from Unity app - Updates player's last_active timestamp - Returns nearby traps within discovery radius - Fetches real-time token balance from blockchain
- `/api/kill-monster` (Zombie Elimination)
- Increments player's kill_count in database
- Triggers `killMonster()` smart contract call
- Awards 1 RIVAL token on successful transaction
- `/api/place-trap` (Strategic Placement)
- Validates player has ≥1 RIVAL token
- Calls `spend()` to burn 1 token
- Stores trap location in PostGIS database
- Returns trap ID for Unity game object
4. `/api/die` (Death Handling)
- Death by Monster: Burns 20% of player's tokens - Death by Trap: Transfers 20% to trap owner - Updates game state and statistics
Game Flow & User Experience
Player Onboarding:
1. Download Unity AR app 2. Connect Web3 wallet (Privy authentication) 3. Grant location & camera permissions 4. AR plane detection** begins automatically 5. Tutorial: Learn shooting, movement, trap placement
Core Gameplay Loop:
1. Explore Real Environment: Move around your space as zombies spawn 2. Combat: Shoot zombies using screen-tap controls with AR crosshair 3. Earn Tokens: Each kill awards 1 RIVAL token via blockchain transaction 4. Strategic Placement: Spend tokens to place invisible traps at GPS locations 5. Competitive PvP: Other players walking near your traps lose 20% of their tokens to you 6. Risk/Reward: Death means losing 20% of your token balance
Social & Competitive Features:
- Real-time Leaderboards: Rankings by kills, tokens, survival time - Player Profiles: Track individual stats and achievements - Trap Networks Create strategic trap placement patterns - Location-based Competition: Battle for control of high-traffic areas
Tokenomics & Monetization
Token Utility ($RIVAL):
- Earning: 1 token per zombie kill - Spending: 1 token per trap placement - Risk: 20% loss on death (to monster or trap) - Reward: 20% gain when your trap kills another player
Economic Incentives:
- Skill-based Rewards: Better players accumulate more tokens - Strategic Depth Trap placement creates passive income streams - High Stakes: Death penalty creates tension and careful gameplay - Social Competition: Leaderboards drive engagement
Unique Value Propositions
True AR Integration
Unlike superficial AR filters, Rivals uses real environment mapping for gameplay. Zombies navigate around your actual furniture, and the game adapts to your physical space.
Genuine Web3 Economics
Not just NFT collectibles—real monetary incentives where skill directly translates to cryptocurrency earnings through competitive gameplay.
Location-Based Strategy
GPS-integrated trap system creates persistent, location-based gameplay where your strategic decisions affect other players across time and space.
Cross-Chain Accessibility
Multi-blockchain deployment ensures players aren't locked into one ecosystem, with seamless chain switching.
Sophisticated AI
State-machine driven zombie AI with realistic pathfinding, vision systems, and behavioral complexity that rivals AAA games.
Market Position
Rivals occupies a unique intersection:
- AR Gaming (Pokémon GO, Harry Potter Wizards Unite) - Battle Royale/Shooter (PUBG Mobile, Call of Duty Mobile) - Play-to-Earn (Axie Infinity, StepN) - Location-based Gaming (Ingress, Geocaching)
It's positioned as the **first truly competitive AR shooter** with **real cryptocurrency rewards**, targeting the growing market of **Web3 gaming** enthusiasts who want skill-based earning opportunities.
This is a groundbreaking project that could define the future of **mobile AR gaming** by proving that immersive augmented reality experiences can be both technically sophisticated and economically rewarding for players.
Prizes
- Flow · Best Killer App on Flow · 3rd place
- Flow · Flow Builder Pool Prize · Flow Builder Pool Prize
- ETHGlobal · ETHGlobal · 🏆 ETHGlobal New York 2025 Finalist
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






