Hi guys,
I am about to finish my master of informatics and I wanted to use my last semester break to think about how you would approach developing an online multiplayer game. While I definitely do not want to develop an MMO and invest my next 5 years into such a large project, I still find it very interesting to think about how you would approach building such a system. Unfortunately, during my studies I mainly focused on machine learning, AI and stuff like that and therefore I have very little knowledge about networking technologies. So hopefully, you guys can give me some insights, tips or links to other interesting resources!
So, lets make this more precise and talk about the game that I envision from the users point of view:
- you are presented a login screen, have to type your name and password as usual
- you are presented a character selection screen and can click on your existing character to continue playing (of course you created that character sometime earlier)
- you press on start and find yourself in let’s say a town. This acts like a lobby where you can see many people (lets say 30)
- you invite up to 3 of your friends to join your group (the friends could for example also be in another lobby / town)
- you click on let’s say a portal and you and your friends are now teleported into a mission.
- here you play the actual game and lets say kill some monsters (only you and your friends can enter this “mission” no other players are supposed to join you)
Well, I hope you get the basic idea. I think there are multiple games that work somehow like this, having lobbies and missions only for you and your friends. One example that comes to mind is Warframe.
Now, let me present you my thoughts on implementing such a game:
To realize…
- we need a database that stores account information like name, password a unique account ID and maybe other stuff. Then we would need an authentication server that receives the name & password, tries to find that combination in the account db and finally knows the unique account ID for the player
- we need a second database that stores character information like level, equipment, inventory… Also we need another “master” server that has access to this character db. So I would imagine that the authentication server tells the master server the unique account ID, the master server can look up the corresponding character information in the db and finally sends the character info back to the client.
- the master server already knows about the logged-in player. Now he has to assign him to a lobby (town). Let’s imagine there is already one lobby that is full (has 30 players). So the master server now has to create a new lobby (a second lobby) where the player can join. In my opinion, the lobby (town) is a unity scene, so for that the master server has to start up a new lobby server (a new unity application that acts as a lobby server)?
- Since we want to chat & invite friends across lobbies, we would need another server that is responsible for managing global chat rooms and chat with friends. That would be the chat server.
-
- 6 Now the friends want to play a mission. Therefore, we need a game server that actually hosts the game, controls the enemies, decides what kind of loot drops etc… So the master server would be responsible for creating a new game server and connect the friends to it so they can play.
So in total, we would need 2 databases (one for account info, one for character info) as well as one authentication server, one master server, one chat server and several servers for lobbies (servers hosting just the town e.g. a unity scene that is a town) as well as even more servers for the missions / games (servers hosting a certain mission, e.g. a unity scene with enemies and so on).
When I say server this of course does not have to be a physical server. Theoretically, everything could run on a single machine and each “server” is just an application.
So to implement the authentication server, chat server and the databases I would not need to touch unity at all. But what about the master server, lobby servers and mission servers? In scenarios like this, do you really have a master server that is responsible for dynamically starting unity applications? Like starting a new unity application that represents the lobby and starting a new unity application that acts as the mission server?
How would you approach a game like this? And maybe even more importantly, do you know any frameworks that can help to program the “lobby” and “mission” unity servers / applications?


