question

Dale Strickler avatar image
Dale Strickler asked

Could we use segments to do simple matchmaking, is there another way?

We are basically want to do this simple match with a random player. But we want a solution that is fast to stand up. low overhead and does not add another cost.

There is this new process but it is overkill and may not be ready for prime time.

We are doing a Unity game so the "Matchmaking with Unity" seems like a natural fit but is there a Unity service we need to connect to Playfab? It seems unclear to me. In general with the matchmaking stuff I am finding it hard to follow what backend services come from were and what costs or not. A higher level architectural view the options would be really great.

It seems like for our needs we could set up a segment of all players who logged in the last minute (the shortest time segments allowed) then call Cloud Script to use the Admin API to get the players from the segment and pull a few random players from there that are currently still online. Would that work? Is that an abuse of the Admin API to be indirectly (through Cloud Script) making many client calls to the admin interface?

We just want 4 random player ids of other players online. If we must use other servers or services we will. It just seems like a lot of effort and perhaps added cost to get something very basic.

Sometime in the future, we may want match criteria but that is major overkill for now.

Suggestions?

Cheers,

Dale

Matchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

No, Admin API calls must never be triggered as a result of a player action. They are not designed for that behavior - only for use in your own title administrative tools.

What you may want to do is just use a statistic that resets on a daily basis, and use the GetLeaderboardAround… API call to get a set of players with scores relatively close to the player. Or if all you care about is their last login time, use the timestamp of the player's login as the "score" and never reset the leaderboard. That way, all the players near the top will have signed in most recently.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dale Strickler avatar image Dale Strickler commented ·

I like the leaderboard from login time approach! I think we can work with this. Thanks!

0 Likes 0 ·
Andrew Garrahan avatar image Andrew Garrahan Dale Strickler commented ·

Thanks this is a great idea.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.