Hybrid Client Relay / Authoritative Server

For a game I’m making in Godot I’d like to use Client Relayed multiplayer with the Nakama Godot Bridge but I want to have a small amount of code server side to handle things like a Lobby with custom match labels for private matches or other filters to expose to the match listing.

I’ve managed to get pretty far along getting all of this to work by just having a MatchLoop that looks for my lobby opCodes and relays anything else with one pretty huge snag. The MatchLoop doesn’t have access to the target Presences sent by the client so I have no way to accurately relay these messages without shoving them in my payload and decoding every message on the server.

Is there any reason we can’t have access to the target Presence’s on the messages in MatchLoop? I understand that they won’t always be used for people doing truly authoritative servers, in which case these will likely just be null/empty, but there are places where you might not want to be fully authoritative and just have a small amount of server side logic and relay everything else.

Would love to know if I’m missing something obvious here though!

Hey, based on opcode you could have a mini system or way to distingwish targets.
In most cases it either will be:

  • Others ( everyone based me )
  • Everyone
  • Specific target.

If you are doing specific target it would require to parse message to know the target but else no. Something like this we have in our game, and it works :slight_smile:

Yea, I think I could make something work here but it’d be nice if I could just use the information already available on the server, passed from the clients. It seems like it’d be a small PR to add support for this and I’d be willing to do the work but want to understand why this isn’t currently provided. Everything else from the client is passed into the match loop to allow relaying messages other than the target presences and this would allow for easier support of partial authoritative setups.