Game Lobby/ Match Making

Hello Everyone,

My game has gotten to the point now that its playable and tested with up to 4 players. Its time for me to turn some of my attention towards the ability to find other people playing, join games, choose maps/game styles (capture the flag, etc)

What are your thoughts on the best kind of gamelobby/match making system to implement? Any games you’ve played with a good game finding system that I can look at for examples? How do modern games do this?

Also does anyone have any experience with connecting to games without forwarding ports? Firewall hole punching?

Mithrin

Congrats on getting a multiplayer game playable!

You might find the Urban Terror (http://www.urbanterror.info/home/) lobby system informative. It keeps a publicly accessible list of known servers and displays all of them in that list. Servers are publicly accessible by default, but can be password protected (and, I’m assuming, restricted to only certain players in other ways too - but I’ve only played on public servers, so I don’t know for sure).

I never found a good java network library with support of hole punching. If you really want to go that route have a look at RakNet. It’s in my humble opinion the best c++ network library for games if you don’t have an in-house solution. Many games and engines have used it before and now it’s open-source thanks to occulus. You only need to write some c++ bindings. It isn’t that difficult I’ve done it once because of hole punching. But than I noticed that it is much easier to host a small relay server and use spidermonkey which perfectly fits in the engine. I think hole punching is not worth the hassle but in your case it could be different.

Edit: if you really want to write the bindings do it yourself and don’t use automated tools like Birdj. You will be faster implementing your small needs than fixing all the issues birdj makes with such a big library.

For udp hole punching you just need to send an empty udp packet to the ip and port from which you want to receive a reply, i’m not sure about what you need to do to get the same with tcp.

My opinion is that it’s better to use the classic client-server model.

A properly setup firewall will not permit hole punching. So don’t depend on it. Let people set ports if they want/need to (ie make you setting on networking available). Or use UPnP. Even better make sure you support ip6 that supports auto config out of the box. But still firewalls, properly configured will block it.

But honestly these days, your going to struggle if at the very least you don’t support steam. Yep that is where most people join their friends for multiplayer games these days. At least for PC.

That greatly depends on your game, the cheating potential etc.

Generally you have two/three types of network infrastructure (maybe more which I don’t know):
You have the authorative central server approach and you have the decentral peer-to-peer approach.

Take Counter Strike: Global Offensive as an example: There you have an authorative server and they actually have two types of lobbies: The lobby which simply lists all available (third party) servers. That way the matchmaking is done manually by the users. This is fine if you don’t require a fixed amount of players, if you want users to host servers (helps you cut cost), etc.

Then there is the matchmaking which assigns 2 teams to a random internal server. This is needed because you get ranked in a scoreboard. User Servers would open up cheating possibilites (modded servers). Technically you could also assign people to random user servers for your game but it might be strange if they enter a modded server and they won’t build a community on a server if you want a bit of an social aspect. Here you also have to implement private lobbies so a group of friends can queue up for the matchmaking.

Then there is the brand new “For Honor” System. It uses Peer to Peer networks so they don’t have server costs. This also works because they only have 3 vs 3 matches, possibly 5 vs 5 as maximum. For this you would need UPnP Setups, lot of troubleshooting with players and open gates for cheaters. Technically they seem to have some kind of server for sync/validation, but the main traffic seems to be synced inbetween players.

“Test Drive Unlimited 2” also was a P2P Game: You notice quite some lagging even if you both are in the same LAN. If you were to create a trading card game thing, then it wouldn’t matter.

But that all isn’t match making itself. If you have many maps and game styles you can go with manual matchmaking and let the users decide manually because else you might have problems with a small user base (4 game modes x 10 maps → 40 possiblities → 160 Players needed so you can find a match for any game mode). You could also have some rank-based thing to rate based on the skill and such. I think it depends on your game and what you want to achieve. There are many talks on that though