Skip to content

heroiclabs/mage-mayhem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mage Mayhem

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.

Prerequisites

Getting started

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.

Running the server locally

The Server/ directory is included to show what the configured Nakama + Hiro backend looks like. If you want to run it yourself:

  1. Add your Hiro license key to Server/local.yml under HIRO_LICENSE.
  2. Start the server:
cd Server
docker compose up --build

This 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.

Project structure

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

License

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.

About

Adventure game sample project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors