Can godot client's NakamaMultiplayerBridge be used in Authoritative mode?

in Relayed mode


var _multiplayer_bridge: NakamaMultiplayerBridge

# on socket connected:

_multiplayer_bridge = NakamaMultiplayerBridge.new(_socket)

self.multiplayer.set_multiplayer_peer(_multiplayer_bridge.multiplayer_peer)

# start matching

var matchmaker_ticket = await _socket.add_matchmaker_async(query, min, max, string_props, numeric_props)

# multiplayer bridge start matching

_multiplayer_bridge.start_matchmaking(matchmaker_ticket)

Godot RPC can be use When players connect successfully

but cant work in Authoritative mode(match created on nakama server)

@wantg apologies but I don’t understand the issue you’re having, nor why an authoritative match would interfere with RPCs.

The RPC I am talking about is Godot’s MultiplayerAPI RPC

@rpc("any_peer", "call_remote")
func sync_mouse_position(mouse_position: Vector2):
	prints("%s -> %s %s" % [multiplayer.get_remote_sender_id(), multiplayer.get_unique_id(), mouse_position])

similar to

UFUNCTION(Client|Server|NetMulticast)
void SyncMousePosition(Vector mousePosition);

in Unreal Engine

I want to use this RPC to handle game logic, it is more convenient than handling protobuf.

Can I send my code to you to check?

@wantg I’m a bit confused, you want to update match data via an RPC? If that’s the case, this is technically possible but it’s not the right way to do it, you should send messages to the match via the socket.

Have you had a look at: GitHub - heroiclabs/nakama-project-template: An example project on how to set up and write custom server code in Nakama server.? It may provide some some inspiration.

My original idea was to use RPC for more convenient, for example, to change my position in other players’ games, i can call other people’s programs to execute some method through RPC.
Use socket to send and receive messages with more code.

I can do that In Relayed mode
but didnot work in Authoritative mode