Jingi Devlog: Phase 5 — Building the network core

Published on
•
2 min read
•
––– views
Demo

Automatically generated narration. Code examples are available in the article.

The first network core

Beta 0.5.0 focuses on networking. I built a custom core for Jingi because I wanted to experiment with many players sharing a world, and reuse the networking work in other projects later.

Why C# and .NET?

I chose C# and .NET for this implementation. I was already interested in the ecosystem, and sharing client code with Unity through .NET Standard libraries was convenient. This was a practical choice for my project, rather than a general ranking of languages.

MasterServer and StateServers

The MasterServer handles entry requests and checks the health of StateServers. StateServers manage the game state. The design includes HTTP entry points so that a web client could be added later.

I tested servers in Singapore and Japan. The idea is to let players choose a nearby StateServer while keeping character data shared across regions.

Early performance tests

In the initial test, a two-core VPS processed around 30,000 TCP packets per second, with five sub-packets in each packet. I used that result to estimate a possible workload of roughly 10,000 concurrent users.

That estimate is not a test with 10,000 real players. Actual capacity will depend on gameplay, update frequency, packet size, and the work done for each player.

Scaling the design

The next goal is to use StateServer health and regional load to decide where additional servers are needed. The core is in place; the broader distributed setup still needs more testing.