How manepallyharshit/hushodyssey works
Hush Odyssey is a browser-based Unity game with a React console, wallet-based POAP minting on Hush Chain, and an optional in-memory player/leaderboard API. The documented loop runs from gem collection through altar validation to a signed on-chain mint. Unity gameplay internals and some UI wiring are described by the README or tree but were not sampled, so their connections are limited to documented bridge events and visible application calls.
Main entry points: App.jsx App Orchestrator · useMint.js Mint Hook · useUnityBridge.js Unity Bridge Hook · WebGLBridge.jslib WebGL Event Bridge
Components 16
React Console
- App Orchestrator
frontend/src/App.jsx - Unity Bridge Hook
frontend/src/hooks/useUnityBridge.js - Bento HUD
frontend/src/components/BentoHUD.jsx - Mint Overlay
frontend/src/components/MintOverlay.jsx - Wallet Hook
frontend/src/hooks/useWallet.js - Mint Hook
frontend/src/hooks/useMint.js
Unity Gameplay
- Game Simulation
unity/Assets/Scripts - Genesis Altar
unity/Assets/Scripts/GenesisAltar.cs - WebGL Event Bridge
unity/Assets/Plugins/WebGLBridge.jslib - Unity WebGL Build
frontend/public/unity/Build/WebBuild.loader.js
Player Memory
- Player API
backend/server.js - Player Model
backend/models/Player.js
Hush Chain Ledger
- Genesis Protocol
blockchain/contracts/GenesisProtocol.sol
Other components
- Player
- MetaMask
- Hush Chain
Connections 18
- Player → App Orchestrator: uses console
- App Orchestrator → Unity Bridge Hook: initializes bridge
- Unity Bridge Hook → Unity WebGL Build: loads game
- Game Simulation → WebGL Event Bridge: emits game events
- Genesis Altar → WebGL Event Bridge: signals mint
- WebGL Event Bridge → Unity Bridge Hook: dispatches events
- Unity Bridge Hook → App Orchestrator: reports gems and altar
- App Orchestrator → Bento HUD: passes player stats
- App Orchestrator → Wallet Hook: connects wallet
- Wallet Hook → MetaMask: requests account and network
- App Orchestrator → Mint Hook: requests mint
- Mint Hook → MetaMask: requests signature
- Mint Hook → Genesis Protocol: calls mintGenesis
- Genesis Protocol → Hush Chain: records POAP
- App Orchestrator → Mint Overlay: passes mint status
- App Orchestrator → Player API: fetches leaderboard
- Player API → Player Model: reads and updates
- Mint Hook → Player API: reports mint success