Matchmaking with Firebase

3.2k Views Asked by At

I am making an Android app, with multiplayer, and need some sort of matchmaking. I am using Firebase, and would prefer to not have to make an external matchmaking server.

My best ide so far is, using the firebase realtime database with transactions:

When a player presses "play" - go through lists of open matches. If no games exists in the list, or if all the games in the list has been filled while the client is searching for an open one - create a new open match. When someone fills the open space in a match, remove the match from matchmaking.

The only hole i can see in this method, is when there are few players creating games at the same time, all thinking that the list is empty.

If anyone with some experience with firebase and/or matchmaking can point out any more holes in this strategy, or perhaps suggest a better strategy for matchmaking, i'd be very happy as i can't test out the strategy at scale yet.

In advance, thanks for helping out - it would be much appreciated.

0

There are 0 best solutions below