A 3D action adventure game built with Nakama and Hiro by Heroic Labs. Players fight through an arena of enemies, record their scores on a daily leaderboard, and earn gold to outfit their battlemage, all powered by Hiro's metagame systems.
This demo project serves as a reference implementation showing how to integrate Nakama and Hiro into a Unity game. For a full walkthrough, see the official documentation.
Open the MageMayhem/ directory in Unity 6. Enter Play mode from the Bootstrap scene. By default, the client connects to a hosted server on Heroic Cloud.
The Server/ directory is included to show what the configured Nakama + Hiro backend looks like. If you want to run it yourself:
- Add your Hiro license key to
Server/local.ymlunderHIRO_LICENSE. - Start the server:
cd Server
docker compose up --buildThis requires Docker and builds the Go plugin, runs database migrations, and starts Nakama. Once running, the Nakama API is available on port 7350 and the Nakama Console on 7351.
Server/ Nakama server plugin (Go), for reference
├── main.go Plugin entry point, registers all Hiro systems
├── definitions/dev1/ Game system definitions (JSON)
├── local.yml Nakama runtime configuration
├── Dockerfile Multi-stage build (pluginbuilder → nakama)
└── docker-compose.yml Local dev stack (Postgres + Nakama)
MageMayhem/ Unity 6 client
├── Assets/
│ ├── Hiro/ Hiro SDK binaries
│ ├── HeroicUI/ UI assets
│ ├── Scripts/
│ │ ├── MageMayhemCoordinator.cs Entry point, auth, system setup
│ │ ├── Arena/ Arena timer, enemy spawning, combat
│ │ ├── Characters/ Player and enemy character controllers
│ │ ├── Abilities/ Gameplay ability system
│ │ ├── Input/ Unity Input System bindings
│ │ └── UI/ UI Toolkit managers and views
│ └── Scenes/
│ ├── Bootstrap/ Initial scene (auth + connection)
│ ├── Lobby/ Main menu, shop, inventory, friends
│ └── Arena/ Game arena
└── Packages/ Unity Package Manager dependencies
This codebase is licensed under the Apache-2 License.
Third-party notices:
- Hiro Game Framework (
Hiro.dll,Hiro.Unity.dll): Licensed separately under the Hiro SDK license. A valid Hiro license is required to use these binaries. - LayerLab UI Assets (
MageMayhem/Assets/HeroicUI/) — Creative Commons CC0 1.0 Universal. Original work created by LayerLab.