Listing Client Relayed Multiplayer Matches w/ Labels and Passwords

Before reading, please note that CRM stands for Client Relayed Multiplayer

Hello, I’m developing a game with Godot and Nakama SDK. I’m aiming to create a similar game to Haxball, so it’s a very simple game and it fits well with P2P ( the original game does what I want to with WebRTC P2P )

I’m using the Client Relayed Multiplayer system and was wondering if its possible to add passwords and labels to these type of matches.

Making a bit of research in our forum I discovered this isn’t possible with CRM. So I wanted to know from you guys what would be the best approach for implementing this system without having to give up on the Client Relayed method. ( My goal is to make a p2p game at first. )

I was thinking on creating another server to store matches and their details ( Label, Password, MatchId ) using some type of database like Redis. So, through requests within Godot and my custom server, I would let the player create his room normally with the CRM model, then, the match id will be sent to my custom server, there I’ll make proper validations and set the player’s room with its details in my Redis DB.

Afterwards, another player will make one request to my server, searching for rooms, I’ll list all rooms labels and the match id so the player can join ( if theres not a password set. if theres one, the player will need to send a valid password in order to receive the match id to join it through the CRM )

What I want to know is:

  1. Is my current approach valid? Will it work?
  2. Is there a feature in Nakama that already does what I’m aiming for? ( BESIDE AUTHORITATIVE MP )
  3. Any other suggestion? Any other approaches?

Versions: Nakama 3, Linux & Docker, Godot 4 SDK

Hello @Suero, I think this approach works, but you do not need a separate server for these things, you can just use Nakama’s custom RPCs and the Storage Engine.

Have a look at our project template to see how to use these features.

Hope this helps.

1 Like