Hi there,
i want to create a card game with turns and all of that, would prefer to have all the code in godot, so client relayed, is it even possible, or is authoritative the clear winner here?
Lets say i am trying to go with the client relayed multiplayer, this is my issue:
If i want to create a match using socket.create_match_async(), (the first player that starts the game does this), idea was that the next player wont create another match, but join the existing one through _client.list_matches_async(so i list all the matches available) and then say:
if len(ListofMatches.matches)==0 → create a match(thats what the first player did)
else
join the match
The issue is that when the _client.list_matches_async is ran with the second player it doesnt show any matches, so the second player just creates another match, how is that possible
Thanks for replies.
Hey @CoCoNuTeK there are two questions here:
(1) Do you use a relayed or server-authoritative approach?
(2) Why doesn’t ListMatchesAsync
return any matches?
For a two player, turn-based card game I’d strongly consider a server-authoritative approach. That way you can add any card validation logic on the server rather than a potentially compromised host client.
As to why ListMatchesAsync
isn’t returning cards for you… it’s hard to say without more information. How are you creating and listing the matches? Do you see any matches running in the Nakama console?
the listmatches is fixed(works properly now) and i want to build it with client relayed multiplayer: does that mean that all the clients will create all the cards(even opponent ones) and i will just update their position based on the presences?
@CoCoNuTeK that sounds okay to me. Just be aware that because you are using client relayed, a malicious client can more easily create cards they don’t own.