googleforgames / open-match-ecosystem

Demos, examples, and tests, oh my!
Apache License 2.0
25 stars 10 forks source link

Prospects for a service which handles parties, lobbies, and much more #12

Open Laremere opened 4 years ago

Laremere commented 4 years ago

This issue is a starting point for solving problems that are matchmaking related but not solved with Open Match’s core components and design. The intention here is not to solve all matchmaking problems, but tackle some important and vaguely related issues. It also seems apparent that these systems would be useful for solving other problems, not just in the domain of matchmaking. We are starting this discussion within Open Match because it seems like a pragmatic location to do so, but in the future will take on whatever form we find that the problem needs. We intend for this to be a community lead discussion, so it will only progress further if others provide design input and commitments to code contribution.

Action Items

Get a feel of the gestalt of the features and solution outline here, speak up if it would solve problems you have, fail to do so, or needs tweeks to fit your requirements. Don’t focus on the details of the solution quite yet - those are easy to iterate on, but instead the high level ideas. The content here is roughly organized from most important to least.

If you want this to exist, the best thing to provide is commitments to help build it. It’s obviously too early to provide those off a single rough design draft, so please do you best to foresee what we need to do to get to that state.

Game night

Let’s begin with a simple story from the gamer’s perspective, and then afterwards dive into what needs to be happening behind the scenes for this story to work.

Alice and Bob are friends and want to try out the latest gaming hit, FPS: the Game. Alice is playing on the streaming service Arenia, and Bob is using their PlayCube console. They both have bought and loaded FPStG, and played through the tutorial.

Alice starts off by texting Bob their user details. Bob searches for Alice and sends a friend request. After accepting the friend request, Bob and Alice can now see each other in their friends list. Alice now sends Bob a similar party request, and after Bob joins their avatars are standing together FPStG’s main menu.

They briefly chat in game about which mode they want to play, and decide that they first want to try out the 2v2 Lifematch. Alice clicks the option from the menu, and “matchmaking...” appears on both of their screens. After a short wait, they find a match playing against Charlie and Dan.

The match is going well, with Alice and Bob having a fun time. However they see that Dan suddenly dropped from the game! Now they’re just playing against Charlie, which is not fun for anyone. Luckily, after a few seconds, Erin joins to replace Charlie’s spot.

The competition is fierce, but Alice and Bob win in the end, great success! This certainly was a lot of fun, so they continued playing late into the night.

Features

Even this short and simple example hit upon a large number of required features:

Also very subtly, there are several matchmaking parameters that are invisible to users but must be implemented with care: Game clients need to determine the best server regions to matchmake on, and player skill (eg elo/glicko) needs to be read for all party members before starting matchmaking, and then updated after the game is finished.

Infrastructure layers

When looking across this feature set, several patterns emerge:

The ideal scenario here is solving these problems in scale. If the game team only needs to implement RPC calls which include all of the input info needed in the request, infrastructure scaling issues can be moved completely away from them.

Universal Concepts

There are 5 concepts which appear to be fairly universal:

Interactions

These primitives can allow for building up features.

Match acceptance is implementable as matchmaking into a lobby. The lobby controller accepts input that a player has accepted the match - if not all players accept the match before the timeout, the lobby closes itself and the party controllers return back to the matchmaking queue.

Lobbies which can be created by players and allow for further control and game specific customization provide a way for players to invite friends into a custom game without using the resources of a game server.

Lobbies would also be useful for building an OSS server browser - far from a matchmaking use case but often great for players, especially for games which allow custom game modes. I’d love to end the streak of all server browsers being universally clunky and slow to load.

Lobby based matchmaking is a frequent request for Open Match. Players seeing a match being formed is a compelling use case for many developers.

Having all players be a member of a party, even if they’re alone, seems like a nice simplification. The rest of the system can assume it’s working with parties and be done with it.

Clients and players /might/ be interchangeable. However it starts getting complicated if you have launcher apps, phone companion apps, or cross game accounts. It’s possible that a player should get a new message notification on their phone as well as a launcher app, for example. Also if the architecture lands on something more akin to message passing, a message passed to the client may really just be a push notification sent directly to the client.

Sessions are useful as separated from lobbies. It would allow a player to view recent games played, and definitely provide useful debugging and analytical information when split from lobbies in games where a lobby might have multiple matches - which would be very common for any game with custom lobbies to play against friends.

Moving further away from the domain of matchmaking, it seems a service like this would also be in charge of:

A universal director for Open Match integrating with this system would make sense. Additionally with a function to turn parties or lobbies (for backfill) into tickets, the external callers to open match would be implemented by this.

Other random choices:

Too early to get into solving some of this, but thoughts that came up while typing everything else up.

How does cross platform friending work? Do they use the respective platforms IDs? A friend code like system? Register with the game or publisher for a cross platform account? What about single platform or singleplayer first games - there it makes little sense to immediately force a player to create an additional account of first boot up. There are a lot of choices here and while I’m guessing a game or publisher account is preferred, it should be possible to do other things to meet external design requirements.

Do parties have leaders? For large parties it can be helpful to have a leader so that mischievous members don’t mess with the group, but for a well behaved group the confusion about who is the party leader and getting them to click the right buttons can be equally frustrating. Same goes for custom game lobbies.

Implementing a game to work with all of this is a massive task. It would be awesome for the developer experience to provide test beds for integrating your game with these systems. This means light instances to run client tests off of, and to quickly iterate and verify client implementations. I’m picturing a game client open on one screen, and the developer being able to, eg, click a button on a webpage which causes their client to get a friend request notification.

syntxerror commented 2 years ago

This would be a great sample to work along side Open Match but should not exist as part of the matchmaker or its process. This would be great for the ecosystem repo. Will move there.