Quickstart
Sign up, fork the reference network, and bring up a lobby + minigame on your own boxes.
HiveScale is one Java SDK and one API key. There’s no backend to run - you point your servers at the network and the SDK handles matchmaking, player data, presence and punishments for you.
1. Add the SDK
Drop the dependency into your pom.xml and export your key. Get a key from
the dashboard - it looks like hv_live_….
# Add the SDK (Maven)
<dependency>
<groupId>dev.hivescale</groupId>
<artifactId>hive-sdk</artifactId>
<version>1.0.0</version>
</dependency>
# Point a server at your network
$ export HIVE_API_KEY=hv_live_••••••••••••••••2. Connect a server
Construct a Hive client once at startup. It reads HIVE_API_KEY from the
environment and registers this box with the network’s server registry.
public final class Bootstrap {
public static void start() {
Hive hive = Hive.connect();
hive.registry().announce("lobby-1", ServerType.LOBBY);
}
} Once announced, the box shows up in findServer results and starts sending
heartbeats automatically. See Server registry for
presence and transfers.
3. Route a player
Ask the network for a server with capacity and send the player there. Routing is capacity-aware, so you never overfill a box.
public void join(Player player) {
ServerInfo target = hive.matchmaking().findServer(GameType.SKYWARS);
hive.transfer(player, target);
} Next steps
- Matchmaking - queues and capacity-aware routing.
- Player data - profiles, currencies and leaderboards.
- Minigame SDK - build a game with
MatchLifecycle.