Challenge 5: Matchmaking with Open Match

Previous Challenge

Introduction

Implement Open Match, which allows for automated matching of connecting players to a game server based on logic you define. The matchmaking function for Space Agon is simple, pairing players based on the order of their requests. You will customize this function to allow your entire team to play a match on a single game server.

Open Match Architecture

Event Diagram

Description

So far, the Find Game feature hasn’t been working because your cluster’s matchmaking service isn’t set up to handle it. To get this feature working, you will need to:

  • Build a Docker image for the Matchmaking Function and push it to your project’s Artifact Registry with the following code:
    export REGISTRY=<YOUR-ARTIFACT-REGISTRY-REPO>
    docker build . -f Mmf.Dockerfile -t $REGISTRY/space-agon-mmf:0.1
    docker push $REGISTRY/space-agon-mmf:0.1
    
  • Write and apply a mmf.yaml, creating a deployment of your Matchmaking Function and a service to access it.
  • Build a Docker image for the Director and push it to your project’s Artifact Registry with the following code:
    docker build . -f Director.Dockerfile -t $REGISTRY/space-agon-director:0.1
    docker push $REGISTRY/space-agon-director:0.1
    
  • Write and apply a director.yaml which includes RBAC.
  • Modify the Matchmaking Function to support a single game with your entire gHack team(including coach), or at least 4 players.

Note The Director is a backend component in the Online Game Service that typically performs the following tasks:

  • Fetch Matches from Open Match for each MatchProfile.
  • Fetch game allocations from a DGS (Dedicated Game Server) system.
  • Establish connections from players to game servers and set Assignments based on connections in Open Match.

Success Criteria

  • GKE shows your Matchmaking Function and Director deployments are running.
  • Your team, including your coach, are able to connect and play on a single game server using the Find Game feature.

Tips

  • A frontend.yaml file has been provided in your GitHub repository. It includes notes to help you know what sections are needed.

Learning Resources

Previous Challenge