What I am trying to achieve is, say I log into one client and they are waiting for a match on the server. If another client does the same, they connect. Ok cool. But what if they are almost ready to join the game, and a third client tries to find the match? Currently I cannot find the match that hasnt started yet after 2 clients and my min is 2 and my max is 4 (defaults). Hope that make sense
This is for a Godot Nakama connection with Godot 3.5.3 and Nakama is running 3.20+. I know its likely related to developer coding but Im curious how Nakama is handling the connections on their end if my scripts are actively still searching for the match on a third client. Does Nakama stop allowing matchmaking after two are already connected?
I would LOVE to learn how to change this to match listing instead for gdscript:
func start_matchmaking(_nakama_socket: NakamaSocket, data: Dictionary = {}) -> void:
leave()
_set_nakama_socket(_nakama_socket)
match_mode = MatchMode.MATCHMAKER
if data.has('min_count'):
data['min_count'] = max(min_players, data['min_count'])
else:
data['min_count'] = min_players
if data.has('max_count'):
data['max_count'] = min(max_players, data['max_count'])
else:
data['max_count'] = max_players
if client_version != '':
if not data.has('string_properties'):
data['string_properties'] = {}
data['string_properties']['client_version'] = client_version
var query = '+properties.client_version:' + client_version
if data.has('query'):
data['query'] += ' ' + query
else:
data['query'] = query
match_state = MatchState.MATCHING
var result = yield(nakama_socket.add_matchmaker_async(data.get('query', '*'), data['min_count'], data['max_count'], data.get('string_properties', {}), data.get('numeric_properties', {})), 'completed')
if result.is_exception():
leave()
emit_signal("error", "Unable to join match making pool")
else:
matchmaker_ticket = result.ticket
This is matchmaking but d rather do a lobby like setup like match listing. Trying to decifer the process lol
Thank you guys!