Open World Matchmaking Service And Dedicated Game Servers Architecture And Design
Overview
The purpose of this document is to explore the general architecture and design of the open world matchmaking service and how it is related to the dedicated game servers. It will focus on the following aspects:
- An overview of what the open world matchmaking service is trying to accomplish.
- A basic architecture and design of the components involved.
- An early investigation of the possible information exchanged, how they are filtered and analyzed with a first prototype.
Use Case
Definition
Given a finite number of dedicated game servers, the open world matchmaking service will ensure that there is a consistent number of players on each dedicated game servers within the same “area” of the map. Consequently, the following behaviors will be observed on each dedicated game server:
- Ideally, there will be 10 to 12 players on each dedicated game server at all time.
- The world will be divided into zones
- The players in the same zones will be moved to the same dedicated game server.
Scope
We will limit this investigation only to the players’ positions. Therefore, we will ignore the following cases and also make several assumptions for now:
- All group information, soft or hard, is ignored.
- Historical information of any kind is not taken into account.
- Factions are ignored.
- Players’ field of vision will be ignored
- We will allow players to pop in and out during matchmaking
The above assumptions will need to be taken into account eventually but not in this prototype.
Basic Architecture and Design
System Diagram
- There is a direct connection between the dedicated game server and the open world matchmaking service.
- The dedicate game servers run the game, keep track of player information and send it to the open world matchmaking service.
- The open world matchmaking process the information from the dedicated game servers.
- The open world matchmaking instructs dedicated game servers to perform player session migration.
- The involved dedicated game servers perform the player session migration.
- Therefore, there is communication between dedicated game servers (not shown here since it is out of scope of this document)
Sequence Diagram
General Flow
- Tracking Dedicated Servers
- The dedicated game servers detect that the need to contact the open world matchmaking service.
- This can happen by default and can be always on for an open world server.
- This is analogous to registering the game server with the service.
- Tracking Players
- The dedicated game servers send player information information to the open world matchmaking service.
- This is done on a regular basis until the dedicated game servers no longer have the desire.
- This can be done by a service that would live inside the dedicated game server.
- Perform Basic Matchmaking
- The open world matchmaking service runs the information through the algorithm in order to find matches.
- New information can arrive and will be taken into account on the next run of the algorithm
- Instruct Dedicated Servers for Session Migration
- When the open world matchmaking service finds a positive outcome, it instructed the dedicated game servers to perform sessions migrations.
- The session migration can involve multiple dedicated game servers (2 or more).
- The creation of a new dedicated game server is possible but beyond the scope of this prototype flow.
At the end of the workflow mentioned above, the dedicated game servers perform the session migrations for the players involved.
Track Dedicated Servers
- The dedicated game servers detect that the need to contact the open world matchmaking service.
- This can happen by default and can be always on for an open world server.
- The dedicated game servers register themselves with the open world matchmaking service.
- The open world matchmaking service would maintain a persistent communication to each of the dedicated servers
- This will serve to push notification for session migration when matchmaking is successful
Track Players
Having being registered with the open world matchmaking service, the dedicated game server proceed with players information.
- The dedicated game servers register a player with the open world matchmaking service.
- In essence, when a new player is detect in the dedicated game server, it is registered with the open world matchmaking service
- Likewise, when it is no longer on that dedicated game server, it should be deregistered.
- It is possible for new player to arrive or leave at any time
- On a regular basis (TBD), the dedicated game server send players’ information to the open world matchmaking service
- The information is necessary for the matchmaking algorithm.
Basic Matchmaking
Input
The open world matchmaking service would receive the following information from each dedicated game server looking for a match:
- The dedicated game server identity
- The player identity.
- The position of each player.
The open world matchmaking service will be initialized with the following information
- The size of the map
- The smallest and biggest possible XY value
- The size of the zone
- The numbers of players per dedicated server
- i.e. 12
Computing
Assumptions
-
We will simply divide the entire map into zones and we will simply matchmake players accordingly.
-
We will ignore the case of deadlock at this moment by assuming that the server population can easily go over the maximum of 12.
-
Given that we have server A, B and C each with 12 players in it.
-
We would need to move 6 players from A to B but B needs to move 6 to C and C needs to move 6 to A.
-
Workflow
- Register the DS
- Register the Players for each DS
- Split the map into zones and maintain the zones as bucket.
- As players’ information comes in, create matchmaking request when necessary
- Move them in the appropriate bucket
- We can update the content of the bucket to represent new players’ information
- Location changed
-
- Matchmaking no longer required
- Once a bucket is filled, we issues the session migration order for the dedicated servers involved.
- The destination dedicated servers should have enough room for the new arrivals
- The dedicated servers involved would be lock from further processing until the migration is done.
Output
The following information would be communicated by the open world matchmaking service to each dedicated game server involved in players’ session migrations.
- The player identity
- The future home (the dedicated game server identity) of the player
The involved dedicated game servers would, thereafter, communicate among themselves to perform the players’ session migration.
First Prototype
Scope
- The scope of the first prototype will be limited to the basic matchmaking algorithm explained above.
- Communication protocol and serialization technology investigation is out of the scope of this prototype
- We will simply use gRPC.
Technology
Open World Matchmaking Service
Built in .NET Core
Communication between Dedicated Game Server and Open World Matchmaking Service
We will leverage gRPC immediately for communication between the dedicated game server and the open world matchmaking service.
Sequence
Diagram
Legend
- Open World Matchmaking Web Service
- Represents an instance of the Open World Matchmaking Web Service being deployed on the cloud. You can think of this as the unit of deployment.
- Open World Matchmaking Service
- Represents the component that contains the communication layer.
- Open World Matchmaking gRPC API
- Is responsible from interpreting gRPC calls
- Open World Matchmaking Strategy
- Represents the component that contains the open world matchmaking algorithm
- Session Coordinator
- Is responsible for coordinate gaming sessions
- Currently, only through speed dating
- Later, it could also be through server re-balancing
- Open World A
- One of the open world involved in the matchmaking
- Is responsible for maintaining the lifetime of a matchmaking request
- Open World B
- One of the open world involved in the matchmaking
- Is responsible for maintaining the lifetime of a matchmaking request
- Roamer A1
- A player roaming on Open World A
- Roamer A2
- A player roaming on Open World A
- Roamer B1
- A player roaming on Open World B
- Roamer B2
- A player roaming on Open World B
- Matchmaker
- Is responsible for maintaining and processing the open world map of matchmaking
- Zone
- Represents a bucket where the matchmaking algorithm is applied
Workflow
- A DS register an open world map in the OWMM service through the open world matchmaking gRPC Api.
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator creates an internal representation of the world.
- A DS register an open world map in the OWMM service through the open world matchmaking gRPC Api.
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator creates an internal representation of the world.
- A DS register a player (roamer) in the OWMM service through the open world matchmaking gRPC Api.
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator creates an internal representation of the roamer.
- The session coordinator adds the roamer to the world.
- A DS register a player (roamer) in the OWMM service through the open world matchmaking gRPC Api.
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator creates an internal representation of the roamer.
- The session coordinator adds the roamer to the world.
- A DS register a player (roamer) in the OWMM service through the open world matchmaking gRPC Api.
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator creates an internal representation of the roamer.
- The session coordinator adds the roamer to the world.
- A DS register a player (roamer) in the OWMM service through the open world matchmaking gRPC Api
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator creates an internal representation of the roamer.
- The session coordinator adds the roamer to the world.
- Detect the need to matchmake a roamer.
- Queue for matchmaking.
- Add the matchmaking request to the proper zone (i.e. bucket).
- Detect the need to matchmake a roamer.
- Queue for matchmaking.
- Add the matchmaking request to the proper zone (i.e. bucket).
- Detect the need to matchmake a roamer.
- Queue for matchmaking.
- Add the matchmaking request to the proper zone (i.e. bucket).
- Detect the need to matchmake a roamer.
- Queue for matchmaking.
- Add the matchmaking request to the proper zone (i.e. bucket).
- A DS update roamers information through the open world matchmaking gRPC API.
- The call is interpreted and forwarded to the session coordinator.
- The session coordinator update the roamers through the open world.
- The open world update roamer A.
- The open world update roamer B.
- The open world update the matchmaking request.
- The matchmaker process the zone for potential session migration.
- A match is found the specified zone.
- The matchmaker raise a notification to the session coordinator.
- The session migration request is forwarded to the open world matchmaking gRPC api.
- The open world matchmaking gRPC api interpret and forward the information to the needed DS.
Leave a Comment
Your email address will not be published. Required fields are marked *