openmatch

package module
Version: v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

README

Open Match

GoDoc Go Report Card License

Open Match is an open source game matchmaking framework designed to allow game creators to build matchmakers of any size easily and with as much possibility for sharing and code re-use as possible. It’s designed to be flexible, extensible, and scalable.

Matchmaking begins when a player tells the game that they want to play. Every player has a set of attributes like skill, location, playtime, win-lose ratio, etc which may factor in how they are paired with other players. Typically, there's a trade off between the quality of the match vs the time to wait. Since Open Match is designed to scale with the player population, it should be possible to still have high quality matches while having high player count.

Under the covers matchmaking approaches touch on significant areas of computer science including graph theory and massively concurrent processing. Open Match is an effort to provide a foundation upon which these difficult problems can be addressed by the wider game development community. As Josh Menke — famous for working on matchmaking for many popular triple-A franchises — put it:

"Matchmaking, a lot of it actually really is just really good engineering. There's a lot of really hard networking and plumbing problems that need to be solved, depending on the size of your audience."

This project attempts to solve the networking and plumbing problems, so game developers can focus on the logic to match players into great games.

Open Match Demo

This section lists the steps to set up a demo for the basic functionality of Open Match. If you just want to see an E2E Open Match setup in action, please continue with this section. If you want to build Open Match from source, or modify the match functions, please follow the Development Guide.

Create a Kubernetes Cluster

Open Match framework is a collection of servers that run within a Kubernetes cluster. Having a Kubernetes cluster is a prerequisite to deploying Open Match. If you want to deploy Open Match to an existing Kubernetes cluster, skip this step and proceed to Deploying Open Match, otherwise create a kubernetes cluster with one of the options listed below:

Deplying Open Match

Run the following steps to deploy core Open Match components and the monitoring services in the Kubernetes cluster.

# Create a cluster role binding (if using gcloud)
kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user `gcloud config get-value account`

# Create a cluster role binding (if using minikube)
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --serviceaccount=kube-system:default

# Create a namespace to place all the Open Match components in.
kubectl create namespace open-match

# Install the core Open Match and monitoring services.
kubectl apply -f https://github.com/GoogleCloudPlatform/open-match/releases/download/0.5.1/install.yaml --namespace open-match

Deploy demo components

Open Match framework requires the user to author a custom match function and an evaluator that are invoked to create matches. For demo purposes, we will use an example MMF and Evaluator. The following command deploys these in the kubernetes cluster:

kubectl apply -f https://github.com/GoogleCloudPlatform/open-match/releases/download/0.5.1/install-example.yaml --namespace open-match

This command also deploys a component that continuously generates players with different properties and adds them to Open Match state storage. This is because a populated player pool is required to generate matches.

Generate Matches!

In a real setup, a game backend (Director / DGS etc.) will request matches from Open Match. For demo purposes, this is simulated by a backend client that requests Open Match to continuously list matches until it runs out of players.

kubectl run om-backendclient --rm --restart=Never --image-pull-policy=Always -i --tty --image=gcr.io/open-match-public-images/openmatch-backendclient:0.5.1 --namespace=open-match

If successful, the backend client should successfully generate matches, displaying players populated in Rosters.

Cleanup

To delete Open Match from this cluster, simply run:

kubectl delete namespace open-match

Documentation

Here are some useful links to additional documentation:

For more information on the technical underpinnings of Open Match you can refer to the docs/ directory.

Contributing

Please read the contributing guide for directions on submitting Pull Requests to Open Match.

See the Development guide for documentation for development and building Open Match from source.

Open Match is in active development - we would love your help in shaping its future!

Support

Code of Conduct

Participation in this project comes under the Contributor Covenant Code of Conduct

Disclaimer

This software is currently alpha, and subject to change. Although Open Match has already been used to run production workloads within Google, but it's still early days on the way to our final goal. There's plenty left to write and we welcome contributions. We strongly encourage you to engage with the community through the Slack or Mailing lists if you're considering using Open Match in production before the 1.0 release, as the documentation is likely to lag behind the latest version a bit while we focus on getting out of alpha/beta as soon as possible.

Documentation

Overview

Package openmatch provides flexible, extensible, and scalable video game matchmaking.

Source Files

Directories

Path Synopsis
cmd
backendapi
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/backend.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/backend.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
mmlogicapi
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/mmlogic.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/mmlogic.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package config contains convenience functions for reading and managing viper configs.
Package config contains convenience functions for reading and managing viper configs.
examples
govanityurls serves Go vanity URLs.
govanityurls serves Go vanity URLs.
redirect
govanityurls serves Go vanity URLs.
govanityurls serves Go vanity URLs.
test
cmd/clientloadgen/player
Package player is module of functions for generating stubbed players to go into the matchmaking pool.
Package player is module of functions for generating stubbed players to go into the matchmaking pool.
cmd/clientloadgen/redis/playerq
Package playerq does CRUD operations on the player pool in state storage.
Package playerq does CRUD operations on the player pool in state storage.
cmd/frontendclient
This is a testing program that stubs multiple frontend api clients, all requesting matchmaking as a group.
This is a testing program that stubs multiple frontend api clients, all requesting matchmaking as a group.
cmd/frontendclient/player
Package player is a module used for generating stubbed players to put into the matchmaking pool.
Package player is a module used for generating stubbed players to put into the matchmaking pool.
internal
app/backendapi
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/backend.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/backend.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
app/frontendapi
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/frontend.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/frontend.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
app/minimatch
This application is a minified version of Open Match.
This application is a minified version of Open Match.
app/mmlogicapi
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/mmlogic.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
This application handles all the startup and connection scaffolding for running a gRPC server serving the APIService as defined in ${OM_ROOT}/internal/pb/mmlogic.pb.go All the actual important bits are in the API Server source code: apisrv/apisrv.go Copyright 2018 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
metrics
Package metrics is an internal package that provides helper functions for OpenCensus instrumentation in Open Match.
Package metrics is an internal package that provides helper functions for OpenCensus instrumentation in Open Match.
pb
Package pb is a reverse proxy.
Package pb is a reverse proxy.
set
statestorage/redis
Package redishelpers is a package for wrapping redis functionality.
Package redishelpers is a package for wrapping redis functionality.
statestorage/redis/ignorelist
Package ignorelist is an ignore list specific redis implementation and will be removed in a future version.
Package ignorelist is an ignore list specific redis implementation and will be removed in a future version.
statestorage/redis/playerindices
Package playerindices indexes player attributes in Redis for faster filtering of player pools.
Package playerindices indexes player attributes in Redis for faster filtering of player pools.
statestorage/redis/redispb
Package redispb marshals and unmarshals Open Match Backend protobuf messages ('MatchObject') for redis state storage.
Package redispb marshals and unmarshals Open Match Backend protobuf messages ('MatchObject') for redis state storage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL