0
\$\begingroup\$

I'm planning to build a big browser multiplayer game with gameplay very similar to agar.io but rpg. Game will be containing rooms as It's done in agar.io. 50-100 players max per room. Realtime. 10ms update loop. The server should be scalable, I guess the kafka or some other message broker should be used, but I can't figure out how to design such system to handle 2000-10000 players per day at least or more.

Where player's state should be calculated?If I create websocket server and create single loop It cannot handle such huge bunch of players. How to split player sessions to kafka consumers or to do something to Improve performance in scalable calculation model?

Any thoughts regarding the server architecture will be appreciated!

\$\endgroup\$
  • \$\begingroup\$ Updating the state of 50-100 players in a room per server tick doesn't sound excessive to me. I'd probably reduce your update frequency (even hardcore competitive FPS games often use a slower server tick than this, and your RPG mechanics can probably handle considerably less frequency). Then you scale by spinning up more rooms (server instances). Have you profiled this to see if you need a more complex architecture at all? \$\endgroup\$ – DMGregory Aug 31 at 13:37
  • 2
    \$\begingroup\$ If I create websocket server and create single loop It cannot handle such huge bunch of players. It can't? Have you tried? \$\endgroup\$ – Philipp Aug 31 at 13:40
  • \$\begingroup\$ I didn't try, I suppose the server should keep and handle ~1000 players or more per 10ms. Also I need to Implement complex came logic like damage by skills,items handling, obstacles handling and many others. I guess It's very hard to handle all of this on the single game server. \$\endgroup\$ – artem baltser Aug 31 at 13:53
  • 5
    \$\begingroup\$ Don't guess. Measure. \$\endgroup\$ – DMGregory Aug 31 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.