Creating a named match in Godot

Hi everyone,

I’ve been trying to create a named match in Godot, but I can’t seem to get it to work. I’ve been trying this example:

I let one user create a match with a name:
var nakama_match : NakamaRTAPI.Match = yield(socket.create_match_async(“ABC123”), “completed”)
In the Nakama admin I can see that a match is indeed successfully created, but there is no reference to the name I chose.
I let another user attempt to join the match like this:
var nakama_match = yield(socket.join_match_async(“ABC123”), “completed”)
However, that doesn’t work. The user can join the match using the (very long) match_id, however.

I now assume that match_name and match_id are not the same thing. But how can I let a user join a match with the name that I chose? I would really like to avoid having to use the rather unwieldy match_id, like in the Fish Game tutorial game.

By the way, as far as I can tell ‘match’ is not a valid variable name in Godot. At least according to my IDE.

I’m using Godot 3.5.1, Nakama 3.14.0, and the Godot plugin 3.2.0.

Thank you for any help you could provide!

Robin

Ok, I think I figured it out after looking at the code of the Godot-Nakama client. If I understand correctly, socket.create_match_async() is used for both creating AND joining named matches.

1 Like