Wrong Matchmaking and leaderboard behavior

Hello !
I’ve almost finished the game i’m working on but I have a few issues i’m encountering with nakama using godot :

  • I want to retrieve a single user leaderboard record but the API returns a bunch of them even thought I provided a single user_id :
    var result : NakamaAPI.ApiLeaderboardRecordList = yield(client.list_leaderboard_records_async(session, leaderboard, [user_id]), "completed")
      if result.is_exception():
          print("An error occured: %s" % result)
          return
      print(result.records)

Returns:

[create_time: 2020-05-27T18:30:50Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: e800a799-3fe8-46f4-b4d5-4283fe9df2a5, rank: 1, score: 99, subscore: Null, update_time: 2020-05-27T18:30:50Z, username: ysxarxVihl, , create_time: 2020-05-27T08:06:03Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: c9a47305-0d89-490b-829b-6e49a33077c3, rank: 2, score: 99, subscore: Null, update_time: 2020-05-27T08:06:03Z, username: RUAbhwxKiL, , create_time: 2020-05-27T07:40:51Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: c00d840c-0514-46a4-a7a1-d486a4f10b81, rank: 3, score: 99, subscore: Null, update_time: 2020-05-27T07:40:51Z, username: mBhvqVrQuI, , create_time: 2020-05-27T18:32:47Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: be23bffd-b1db-4a2f-8d08-0d6aa9ba0826, rank: 4, score: 99, subscore: Null, update_time: 2020-05-27T18:32:47Z, username: FuqPpRloMj, , create_time: 2020-05-27T07:39:21Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: bb076a44-d927-4398-a8fa-ced708d0766b, rank: 5, score: 99, subscore: Null, update_time: 2020-05-27T07:39:21Z, username: ZYZGXOYCkL, , create_time: 2020-05-27T18:29:20Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: b9e51fdd-bfd9-416c-8105-5f383ffc40f0, rank: 6, score: 99, subscore: Null, update_time: 2020-05-27T18:29:20Z, username: AUNDTfCCTT, , create_time: 2020-05-27T08:03:45Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_id: a71f0119-0f3e-4ba8-8213-adf9b8b33503, rank: 7, score: 99, subscore: Null, update_time: 2020-05-27T08:03:45Z, username: jEsPaGGLzA, , create_time: 2020-05-27T07:51:23Z, expiry_time: Null, leaderboard_id: bronze, max_num_score: 1000000, metadata: {}, num_score: 1, owner_[...]

I checked to see if wanted user were in the records but it isn’t even in their. But i’m sure it is in the leaderboard since it appears when I retrieve records around user like I describe later

  • When I want to retrieve leaderboard records around user, it returns correctly a bunch of records but if they have the same score, the ranking is all messed up and it even ommit some of them :

  • When I want to use matchmaking with a query, it doesn’t find any match no matter how much users are in queue and matching the requirements :

var query = "properties.league:bronze"
  var min_count = 2
  var max_count = 2
  var string_properties = {
      "league": "bronze"
  }
  var numeric_properties = {}
  var matchmaker_ticket : NakamaRTAPI.MatchmakerTicket = yield(
      socket.add_matchmaker_async(query, min_count, max_count, string_properties, numeric_properties),
      "completed"
  )
  if matchmaker_ticket.is_exception():
      print("An error occured: %s" % matchmaker_ticket)
      return
  print("Got ticket: %s" % [matchmaker_ticket])

It succesfully returns a ticket but “received_matchmaker_matched” callback is never trigerred. It works well with “*” query though. Anyone would see the problem ?

Thanks in advance for your help!

Ok i just tryed getting record by user_id directly from an http get request on the browser and it’s working fine. Must be a problem with Godot Nakama API then. Still have issues for around user records and matchmaking though

Edit: Just found out there is a separate object called “owner_records” in the response. One probleme fixed 2 more to go !
For the record around owner i’ll do a manual sort for now.
Is there a way to track current users in matchmaking pool ?

Hi, I’m facing this problem and when I use query “*” I get a matched result where all the players rave string_properties={} and numeric_properties={}, so the real issues seems to be the values of those 2 dictionaries are not really sent to server.

in NakamaSocket.gd the method _send_async starts with
logger.debug(“Sending async request: %s” % p_message)

and in this call the message still contains the dictionaries, but I don’t know why the are lost in the way

how did you solve it?