Today I've started my journey into creating a Minecraft Server.
I was fed up with having 300 Ping on Hypixel, and was unable to find a drop in replacement that had
- full-ish lobbies
- the same/a very similar game system to Hypixel
- actually registering hits (low ping)
At first I wanted to go the easy route, grab something like simplecloud or cloudnet, and set the entire thing up in an afternoon. And I tried. But my 4am brain, at the first slight inconvenience, decided that relying on a questionably-maintained halfworking management tool for managing a network which'd surely get millions of players (/j) is stupid, and i should just make my own. Cus what could go wrong!
Now, knowing whats running your server doesn't sound that stupid. Afterall, both for security and maintainabilitie's sake, this makes things easier in the long run. Small issue being: I dont know java. (Well, not beyond a high school level at least). So this is gonna be interesting.
I had one thing on my side: I know how a minecraft network is supposed to function on a basic level.
graph TD
p{Player} --> Proxy
Proxy --> LobbyServer
Proxy --> Survival-1
Proxy --> Survival-2
Setting up each of these components is not too hard, each only taking about an hour. However, I don't want survival servers. I want bedwars servers. And these pose a few challenges:
- Each server can only hold as many players as are playing in a round. Meaning: I don't want to limit myself to just 2 or 3 Servers, and have everyone else wait until these rounds have finished before joining. I need to add more servers if all other servers are full. Equally, I also need to remove servers if they're empty.
- The bedwars arena needs to be reset after each round before players can play on it again. The state of these servers needs to be ephemeral.
Luckily, there's a software that does exactly this: Docker.
For now, I've created a few docker images that I'll be using to run my servers. These are:
graph TD
A[justbedwars/velocity:latest] -->|Based on| B[External OpenJDK]
C[justbedwars/purpur:base] -->|Based on| B
D[justbedwars/purpur:bw] -->|Based on| C
E[justbedwars/purpur:bw-8x1] -->|Based on| D
A -->|Running| F[Velocity Software]
C -->|Contains| G[Base Shared Files]
C -->|Contains| H[Shared Plugins]
D -->|Contains| I[Bedwars Plugin]
E -->|Contains| J[Bedwars Config for 8 Solo Teams]