-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1454e4c
commit d6f1a5c
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
title: Games, Servers, and Instances | ||
--- | ||
|
||
On BlueDragon, we have three main units that describe places players can be: games, servers, and instances. | ||
|
||
## Instances | ||
|
||
Instances are the most granular descriptor. You can learn more about instances in [Minestom's documentation](https://wiki.minestom.net/world/instances). | ||
They are most similar to worlds on an ordinary Minecraft server. Each server has multiple instances. | ||
|
||
Instances have unique IDs, which are in the format of a Java [UUID](https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html) (dashed). They are only used within the server and shouldn't be shared with other services. | ||
|
||
## Games | ||
|
||
Games are the next smallest unit. Games can have multiple instances, and servers can have multiple games. | ||
|
||
Games each have an ID, which we refer to as a "Game ID". It is a four-character, random, alphanumeric string. Game IDs are used to send players to the games that they queued for. | ||
|
||
Events are [filtered](https://wiki.minestom.net/feature/events) ([view source code](https://github.com/BlueDragonMC/Server/blob/b05b09ad229ccf85da20130510c9c1cdf90bbeed/common/src/main/kotlin/com/bluedragonmc/server/Game.kt#L93-L100)) at the Game level, and we attempt to hide players in separate games from each other in the chat and tab list. | ||
|
||
It is the Game's responsibility to clean up old instances that it owns when they are no longer in use. | ||
|
||
### Game Names vs Game IDs | ||
|
||
- "Game name" refers to an internal name of a game, like `wackymaze` or `paintbrawl`. | ||
- "Game ID" refers to a four-character random string that identifies a specific instance of a running game. | ||
|
||
## Servers | ||
|
||
A server refers to one process that is executing the [`Server`](https://github.com/BlueDragonMC/Server) project JAR. | ||
|
||
Servers can have multiple games, which can each have multiple instances. | ||
|
||
It is the Server's responsibility to clean up old games. | ||
|
||
### Server IDs | ||
|
||
In a production environment, servers each have their own IDs. These are typically auto-generated by Kubernetes, and will | ||
conform to the pattern `<fleetName>-xxxxx-xxxxx`. These IDs match the pod IDs that Kubernetes assigns. | ||
|
||
Outside of Kubernetes, the `HOSTNAME` environment variable is used to generate a server ID. | ||
|
||
Server IDs are used in communication with Puffin and to register the server's address on each proxy. |