| title | Reflex Arena |
|---|---|
| emoji | ⚡ |
| colorFrom | green |
| colorTo | blue |
| sdk | gradio |
| sdk_version | 5.50.0 |
| python_version | 3.11 |
| app_file | app.py |
| pinned | false |
| license | mit |
| short_description | Vision-Driven AR Sports & Reflex Arena Platform |
THE SCREEN IS THE ARENA. THE CAMERA SEES YOU. YOUR BODY IS THE CONTROLLER.
A vision-driven augmented reality competitive sports and physical reflex intelligence platform. One camera, one screen, real athletic sports, and precision reaction benchmarks — your body is the input device, the game engine simulates the virtual championship, and every millisecond is measured honestly.
Play directly inside your web browser using your webcam with real-time AR overlays: 👉 Launch Reflex Arena on Hugging Face Spaces
Run locally for the full esports stadium experience with dynamic synthesizer audio:
# Clone the repository
git clone https://github.com/PoseidonProMax/Reflex-arena.git
cd Reflex-arena
# Instant run with uv (Windowed mode recommended)
uv run reflex-arena --window
# Or Fullscreen
uv run reflex-arenaRequires a standard webcam (automatically falls back to mouse control with TAB).
Every sport is rendered in First-Person POV: you stand inside the goal facing the striker, or on your side of the net facing your opponent across the court.
| Sport | Match Scoring Rule | Equipment & Zone | Visual World |
|---|---|---|---|
| ⚽ FOOTBALL (Goalkeeper) | 10 Penalties Shootout | Dual Goalkeeper Gloves (Hands, arms, feet) | Floodlit night stadium with goalposts, netting, and 850+ cheering fans |
| 🏐 VOLLEYBALL | First to 7 Points | Dual Forearm Dig Pads | High-detail hardwood arena with net mesh, antennas, and opponent returns |
| 🏸 BADMINTON | First to 11 Points | Aerodynamic Intercept Rackets | Championship badminton court with steep smashes, feathered drops, and fast drives |
| 🎾 TENNIS | Championship Game (15 - 30 - 40 - DEUCE - GAME) |
Pro Graphite Rackets | Clay / Hardcourt arena with baseline drives, top-spin arcs, and deceptive breaks |
Clicking SPORTS opens the dedicated difficulty selection portal with 3 tailored game modes:
-
🟢 EASY (Casual & Recreational):
- Relaxed ball velocity and wider defensive reach tolerances.
- Opponent commits regular unforced errors (~40% mistake chance on return).
- Progressive rally acceleration keeps rallies engaging over time!
- Quick Action: Click or Press
1.
-
🟡 MEDIUM (Real Match Intensity):
- Authentic professional velocities, top-spin dips, and balanced drives.
- Opponent plays solid defense with occasional unforced errors (~20% mistake chance).
- Quick Action: Click or Press
2.
-
🔴 HARD (Pro Circuit Championship):
- Lightning-fast smashes, tight corner trajectories, and sharp curve breaks.
- Elite championship opponent (~8% mistake chance) demanding clutch reflexes.
- Quick Action: Click or Press
3.
-
Symmetric Rally Scoring:
- In Badminton, Volleyball, and Tennis, hitting or intercepting the ball keeps the rally alive and drives the ball back over the net.
- Opponent drops / misses the return ➔ YOU win the rally point (
+1 POINT). - You drop / miss the incoming shot ➔ OPPONENT wins the rally point (
+1 POINT). - In Football, save as many of the 10 penalty strikes as you can!
-
Progressive Rally Acceleration:
- In every sport (even on Easy), each consecutive return accelerates the ball flight speed (
t_flightdecreases progressively). - Rallies start accessible and naturally build into an intense test of endurance!
- In every sport (even on Easy), each consecutive return accelerates the ball flight speed (
-
Final Match Scoreboard:
- Comprehensive post-match scoreboard displaying:
- 🏆
MATCH VICTORY/⚡ MATCH DEFEATbanner. - Side-by-side head-to-head scorecards (
YOU: XvsOPP: Y). - Max Rally Streaks, Saves, Unreturned Shots, and Match Difficulty.
- 🏆
- Comprehensive post-match scoreboard displaying:
Reflex Arena features an articulated 2.5D esports athlete mascot (Pengu Prime):
- Heroic Proportions: Athletic ready stance with real-time reach tracking.
- 2-Bone Inverse Kinematics (IK): Articulated penguin flipper-wings tracking your left and right wrists in real-time.
- Permanent Cyber Equipment Sleeves: Left Wing in Cyan (
#00FFD0), Right Wing in Magenta (#FF007F). - Cyber HUD Visor: Animated reflective neon sunglasses with active scanline HUD.
- Dynamic Arena Floor Shadow: Dual-layer ambient occlusion beneath feet.
Every run is analyzed and mapped onto a comprehensive 5-axis spider radar:
- REACTION: Millisecond onset latency from shot launch.
- PRECISION: Centering and contact accuracy (PERFECT ×1.5, CLEAN ×1.0, SCRAPE ×0.6).
- MOVEMENT: Lateral coverage, reach envelope, and footwork mobility.
- REDIRECTION: Multi-directional spatial defense.
- CONSISTENCY: Sustained rally stamina and combo retention (Streak 3/5/10/15 ➔ Multipliers ×1.5/×2/×3/×4).
Stream live body tracking directly into Unreal Engine 5 projects at zero latency:
# Start the local WebSocket bridge (ws://127.0.0.1:9001)
uv run reflex-arena-bridge- Localhost WebSocket Protocol: Lightweight JSON telemetry (positions, velocities, confidences, timestamps).
- Zero Cloud Leakage: Camera frames stay 100% local on your machine.
- Ready-to-use UE5 Plugin: Includes C++ goalkeeper pawn and receiver in
unreal_kit/.
reflex_arena/
├── main.py # Application shell & scene state machine
├── theme.py # Design system (Dark Cyber Neon, Rajdhani & Chakra Petch typography)
├── ui_kit.py # Component library (cards, buttons, sliders, dialogs)
├── motion.py # Easing functions, count-up animations, transitions
├── backdrop.py # Dynamic animated backdrops & stadium atmospheres
├── tracker.py # Capture & MediaPipe pose tracker threads
├── filters.py # EMA & Kalman 2D position filters
├── calibration.py # 7-anchor affine reach envelope calibration
├── scoring.py # Reflex DNA engine & rating calculators
├── bridge.py # Localhost WebSocket bridge for Unreal Engine 5
├── scenes/
│ ├── menu.py # Main navigation portal
│ ├── sport_difficulty_scene.py # Dedicated EASY / MEDIUM / HARD difficulty selector
│ ├── sports_hub.py # 4 Sports arena hub
│ ├── reflex_hub.py # Pure reaction benchmark modes
│ ├── results.py # Match scoreboard & DNA radar breakdown
│ └── profile.py # Persistent player history & DNA archetype
└── sport/
├── football.py # Goalkeeper shootout physics & penalty generator
├── intercept.py # 3D net-sport parabolic arc physics & rally logic
├── court.py # 3D stadium court floor, net, & spectators
├── stadium.py # First-person goalkeeper stadium architecture
├── mascot.py # Pengu Prime 2.5D IK cyber-athlete mascot
└── equipment.py # Permanent Cyan/Magenta gloves & rackets
Reflex Arena includes an automated test suite with over 300+ automated unit and integration checks:
# Run headless logic checks (300+ tests)
uv run python tests/test_logic.py
# Run difficulty flow & sports pipeline tests
uv run python tests/test_difficulty_flow.py
# Run full windowed smoke test walk
uv run python tests/test_smoke_windowed.pyDistributed under the MIT License. See LICENSE for details.