Is matchmaking possible with GODOT 4 and NAKAMA?

Hello Sirs!

I put you in situation, I am using Godot 4 (GDScript) and Nakama to create an online game. This game will have 1vs1 turn-based combat. Now here comes my problem. From the HeroicLabs github I have been able to download the necessary addons to do the registration and work with the data storage (client, api, etc. For Godot 4). And everything works fine. Now, I have been trying to create a matchmaking with the Nakama platform for a while. Which is impossible for me. I have tried to migrate the code of the fish game from Heroic Labs to run it in godot 4, and it always ends up giving an error on one side and on the other and in the end I end up doing a frankenstein code and still I still can’t get it to work. The problem comes with the famous Online.gd and OnlineMatch files that are used for this in godot. It’s impossible for me to make them work for Godot 4 machmaking. I’m exhausted… I ask you for help, if someone knows where I can find these files with the code for Godot 4, or if there is an example of how to do a matchmaking somewhere. I’ve been stuck here for a few days. Thanks in advance.

Hey @sergisnt, can you send more details on the errors you’re getting with
Godot 4?

hi @ftkg (Im using now Godot 4 Beta 1) Unfortunately I have deleted the part of the code with which I was testing and trying to adapt it, since in the end there was no way to work even with a bad code on my part. I decided to wait until they added some nakama assets similar to the ones in Godot 3. Could you tell me if they are working on it? On the other hand, I didn’t find any projects in Godot 4 with nakama assets. Do you know where I could find something like that to use as an example?
Thanks for replying, and sorry I can’t provide you with the code part. Yes, I can help you with the errors that appear in Godot 4 Beta 4 with these Nakama assets. I leave them here, possibly they are the cause of the error.

Several errors appear in this image, I have to say that I have tried this with Godot 4 Beta 4 from godot. It tells me that NakamaSocket already exists as a global, and it is false, in the autoload there is no singeltone named like that. A guy told me that there is a way that there are singeltones but they don’t appear in Autoload. I haven’t really found how to do that. Any help with this would also be appreciated.

Just to confirm, are you using the correct Godot 4 Nakama client available in this branch?

Well, I was using the addons prior to these. I just added the addons from the specific branch that you told me about, and they work correctly, the files are not corrupted. It’s fixed, thanks mate.