Developer Diary #2: The Tech Behind Overqualified!
The Foundation: Tools, Frameworks, and Infrastructure
Developing a robust, multiplayer-compatible mod like OverqualifiedTM! requires a scalable architecture and the right tools. Here’s a look at the tech stack powering our products:
Proxy Server:
A high-performance Golang-based proxy server handles communication between clients and the Kubernetes-managed game server infrastructure. This architecture ensures efficient messaging, seamless scalability, and smooth player transfers.
Orchestration and Deployment:
- Kubernetes: The backbone of our server infrastructure, Kubernetes enables horizontal scalability, dynamically spinning up lobby and game servers to meet player demand.
- CosmosDB Integration: All player data is stored securely and persistently in CosmosDB, ensuring a seamless, reliable, fast experience across all of our systems
Development Environment:
- IDE: Visual Studio Code with extensions for Go, TypeScript, and YAML.
- Version Control: GitHub for collaboration and change tracking.
- Build and Deploy: Custom pipelines automate asset compilation, deployment, and Kubernetes updates. We built these pipelines off of the @minecraft/core-build-tasks
Content Management:
- Scripting: centralized entrypoints across all concurrently running modules in the primary behavior pack's index.ts file.
- Assets: We manage all static assets in a separate repository as a submodule (item/block textures, entity definitions, etc) and allows our development and content teams to work collaboratively but also independently from each other.
- Dynamic Assets: templatized JSON generators allow us to rapidly create minecraft JSON for scaling items and entities from our content database to create varied experiences with dynamic behaviors quickly.
Horizontal Scalability: Game Servers Built for Growth
To handle a growing player base, we designed our game servers with horizontal scalability in mind. This architecture includes two primary server types:
Lobby Servers:
- Home to our Lobby Server map, free for all users with an account created on our servers!
- Manage player matchmaking and initial game setup.
- Scalable based on player logins to minimize wait times.
Mini-Game Servers:
- Host specific game instances, such as multiplayer sessions for OverclockedTM! or other modules.
- Dynamically scaled to ensure smooth gameplay even during peak hours.
Development Build Servers
For internal testing and development, we use additional build servers to:
- Design and test new levels.
- Experiment with in-game mechanics and features before deployment.
This setup ensures that production servers remain unaffected by ongoing development work.
Tackling Multiplayer Challenges
Creating a seamless multiplayer experience for OverqualifiedTM! involves addressing technical challenges inherent to Minecraft's server infrastructure. One of the most complex aspects is efficiently managing player transfers between servers.
The Role of the Proxy Server
At the core of our architecture is a high-performance proxy that manages the Kubernetes cluster and enables players to transition smoothly between servers. Whether players are moving from a lobby to a mini-game server or between different game instances, the proxy ensures seamless communication and synchronization across the infrastructure.
Key Challenge: Transferring Players
Minecraft’s transfer player packet presents a significant hurdle—it requires players to disconnect from their current server and reconnect to a new IP address and port. This process can feel disjointed, interrupting the immersive experience we strive to deliver.
Our Solution
To mitigate these disruptions:
Proxy-Orchestrated Transfers:
- The proxy manages all connections and session persistence, coordinating with Kubernetes to efficiently reassign players to the appropriate server instance.
- This minimizes downtime during transfers, ensuring players are reconnected as quickly as possible.
In-Memory State Preservation:
- Game states are cached and transferred alongside the player, allowing them to pick up right where they left off, regardless of the server.
Planned Enhancements: Dimension Shifts
In future updates, we aim to leverage dimension shifts, a feature already used in other Minecraft featured servers, to streamline the transfer process. This approach will allow server transitions to feel seamless, eliminating the need for a full disconnect/reconnect cycle and creating a smoother, more immersive experience.
Server-Client Architecture: Built for Performance
Our mod’s structure balances client-side responsiveness with server-side reliability. Below is a diagram of our server architecture, now incorporating the proxy server and its relationship with multiple lobby and game servers:
Lessons Learned and What’s Next
Key takeaways from our development journey so far:
- Leverage Scalability: Kubernetes’ horizontal scaling capabilities have been crucial for managing player load.
- Plan for Seamless Transfers: Our proxy server has been a cornerstone in improving player movement between servers.
- Iterate on Feedback: Beta testing revealed edge cases in multiplayer synchronization and server scaling.
Stay tuned for:
- Expanding content for Overclocked!TM to include intermediate and advanced tutorials.
- Implementing dimension shifts for even smoother server transfers.
- Releasing our beginner tutorials of OverreactedTM!, OvergrownTM! and OverchargedTM!
Thank you for following our journey! Stay tuned for our next diary, where we’ll dive into crafting interactive in-game tutorials and leaderboard mechanics.
Learn On!
— The Pedegree Studios Team