Minigame SDK
Write a game as a handful of lifecycle methods. The network runs the instances, matchmaking, scoring and payouts for you.
A minigame is a class plus a hive-game.json manifest. You write the rules of
your game - start, death, win - and the network runs everything around them:
spawning instances, filling lobbies, the countdown, scoring, stats and sending
the winner home. There is no game loop to host and no backend to run.
Pick a genre
A genre owns the lifecycle; you override the verbs. There are two:
- Match games - one round, last-team-standing.
SkyWars, Bedwars, duels. You override
onStart/onDeath/onEnd; the genre handles the countdown, win detection and transfer-home. - Party games - a host that rotates a lobby through a series of micro-games, Mario-Party style. Each micro-game is a two-method seam; the host owns the board, turns and coin payout.
A match game is, in full, “subclass, override three methods”:
public final class SkyWars extends MatchLifecycle<SkyWarsConfig> {
public void onStart(MatchContext ctx) {
ctx.players().forEach(p -> p.teleport(ctx.spawn(p)));
}
public void onDeath(PlayerHandle p, MatchContext ctx) {
ctx.eliminate(p); // base checks the win condition for you
}
} That’s the whole game’s orchestration. Everything else is inherited from the genre. The fastest way to feel it is the Build your first game walkthrough: an empty folder to a SkyWars you can join, in five steps.
What you can build
If your game fits one of these shapes, the genre already does the heavy lifting. The “you write” column is the whole of your game logic:
| Game | Genre | You write |
|---|---|---|
| SkyWars, Bedwars | match | spawn players, eliminate on death (last standing wins) |
| Duels, 1v1 | match | spawn two players; default win check ends it |
| King of the Hill, Cap-the-flag | match | score an objective, call ctx.win(team) |
| Mario-Party-style host | party | a pool of micro-games, two methods each |
| Spleef, Color floor, Falling-floor | party round | arm the arena, rank by last-standing |
| Dropper, Parkour race | party round | a finish marker, rank by finishing order |
The two genres cover elimination matches and rotating party hosts. Anything genuinely outside them (a persistent open-world economy, say) is a normal Hive server, not a minigame, and uses the SDK directly.
How the pieces fit
| Page | What it covers |
|---|---|
| Build your first game | the five-step walkthrough, start here |
| Match games | MatchLifecycle, the verbs, MatchContext, win conditions, teams |
| Party games | the round host, RoundMinigame, scoring and coins |
| Manifest & config | hive-game.json reference and typed, dashboard-tunable config |
| Ports & portability | PlayerHandle / GameWorld, the native escape hatch, one-engine vs. cross-engine |
| Page | What it covers |
|---|---|
| Match games | MatchLifecycle, the verbs, MatchContext, win conditions, teams |
| Party games | the round host, RoundMinigame, scoring and coins |
| Manifest & config | hive-game.json reference and typed, dashboard-tunable config |
| Ports & portability | PlayerHandle / GameWorld, the native escape hatch, one-engine vs. cross-engine |
What you get for free
Because your game is a Hive server like any other, the rest of the platform is already wired in - no extra integration:
- Matchmaking routes players into your game by id and spreads them across instances, capacity- and start-aware.
- Player data gives each game an isolated namespace, so your wins/kills never clobber another game’s stats.
- Punishments apply network-wide and follow players into and out of your instances.
- Server registry tracks presence and handles transfers between servers.
Run it
Building a game produces an ordinary server jar. Drop it in mods/, point the
server at your network with the same HIVE_API_KEY every other server uses, and
it self-registers, no extra config. The
Build your first game walkthrough does this end to
end.
The minigame SDK is rolling out alongside the Hytale beta and the API is still settling. Want early access or have a game in mind? Talk to us - we answer fast.