Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes

Agones logo

go.dev reference GoDoc Go Report Card GitHub release Follow on Twitter

Agones is a library for hosting, running and scaling dedicated game servers on Kubernetes.

Agones, is derived from the Greek word agōn which roughly translates to “contest”, “competition at games” and “gathering”. (source)

Why does this project exist?

Agones replaces usual bespoke or proprietary cluster management and game server scaling solutions with a Kubernetes cluster that includes the Agones custom Kubernetes Controller and matching Custom Resource Definitions for GameServers, Fleets and more.

With Agones, Kubernetes gets native abilities to create, run, manage and scale dedicated game server processes within Kubernetes clusters using standard Kubernetes tooling and APIs. This model also allows any matchmaker to interact directly with Agones via the Kubernetes API to provision a dedicated game server.

For more details on why this project was written, read the announcement blog post.

Major Features

  • Define a single GameServer, and/or large game server Fleets within Kubernetes - either through yaml or via the API
  • Manage GameServer lifecycles - including health checking and connection information.
  • Fleet Autoscaling capabilities that integrate with Kubernetes' native cluster autoscaling
  • Gameserver specific metric exports and dashboards for ops teams

Usage

Documentation can be found on the Agones website.

Get involved

Code of Conduct

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

Reporting Security Issues

To report a security issue for this project, please follow the instructions in the Project Security Policy

Development and Contribution

Please read the contributing guide for directions on submitting Pull Requests to Agones, and community membership governance.

See the Developing, Testing and Building Agones documentation for developing, testing and building Agones from source.

The Release Process documentation displays the project's upcoming release calendar and release process.

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

This all sounds great, but can you explain Docker and/or Kubernetes to me?

Docker

Kubernetes

Licence

Apache 2.0

Comments
  • sdk arm64 images

    sdk arm64 images

    What type of PR is this?

    Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

    /kind breaking /kind bug /kind cleanup /kind documentation

    /kind feature

    /kind hotfix

    What this PR does / Why we need it: Build sdk image for arm64 hosts Which issue(s) this PR fixes:

    Work on https://github.com/googleforgames/agones/issues/2216

    Special notes for your reviewer:

  • Adds the first e2e test

    Adds the first e2e test

    This is a sample of one e2e tests for #37 . This first test create a gameserver, waits for readiness, assert some values then finally ping it (send/receive).

    The idea of this PR is to see if the direction is correct, but also I'd like to plug it to cloud builder to see if we can make it works @markmandel I'll need your help on this. ( Can we use your account to provision a cluster for e2e ? How should we proceed ?)

    I would like that we list all tests for gameservers/fleets/allocation, so I can tackled them one by one. (Let's use the ticket #37 )

    Locally with a GKE cluster it works. (I'm having sometimes some timeout with the k8s api, might be from my connection Post https://35.185.224.168/apis/stable.agones.dev/v1alpha1/namespaces/default/gameservers: dial tcp 35.185.224.168:443: i/o timeout)

    Have a spin, I hope you like it.

  • Fix Network Security Group Gameserver rule not applied on AKS cluster

    Fix Network Security Group Gameserver rule not applied on AKS cluster

    /kind cleanup

    What this PR does / Why we need it: Hello

    This PR fixes AKS gameserver network security rule not added to the effective AKS node pool network security group.

    AKS install terraform included a network security group and two network security rules which were not used. This PR follows AKS create cluster documentation by adding the incoming gameserver security rule to the aks-agentpool-******-nsg network security group

    Regards

  • Fix Fleets RollingUpdate

    Fix Fleets RollingUpdate

    Make sure that GameServers actually are Ready before scaling down inactive GameServerSet.

    What type of PR is this?

    Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

    /kind breaking

    /kind bug

    /kind cleanup /kind documentation /kind feature /kind hotfix

    What this PR does / Why we need it: If creating new GameServers take more than 30 seconds there is a situation when all GameServers would go down to 0 and all new GameServers would be in a Scheduled state.

    Which issue(s) this PR fixes:

    Closes #1625

    Special notes for your reviewer:

    There are steps to reproduce inline with a ticket. Will create a simple E2E test to make sure this functionality is covered.

  • Update the GameServerAllocation Specification to remove required/pref…

    Update the GameServerAllocation Specification to remove required/pref…

    What type of PR is this?

    Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

    /kind breaking /kind bug

    /kind cleanup

    /kind documentation /kind feature /kind hotfix

    What this PR does / Why we need it: details can be found here #2146

    Which issue(s) this PR fixes:

    Closes #2146

    Special notes for your reviewer:

  • Support graceful termination

    Support graceful termination

    What type of PR is this? /kind feature

    What this PR does / Why we need it: To support terminationGracePeriodSeconds. Terminate only when SIGKILL is received. Currently when terminationGracePeriodSeconds is defined for a gameserver, the agones SDK sidecar terminates immediately when it receives a SIGTERM.

    Which issue(s) this PR fixes:

    Closes #

    Special notes for your reviewer:

  • Initial version of EKS terraform config

    Initial version of EKS terraform config

    Add module for EKS cluster. Add documentation and example which uses submodules.

    Disabled agones-system/agones-ping-udp-service for now as it breaks the helm_agones deployment. There is a need to add two more Node Pools ( Worker Groups) for metrics and system with taints.

    Closes #966 .

  • Custom fleet autoscaler resync interval

    Custom fleet autoscaler resync interval

    What type of PR is this? /kind feature

    What this PR does / Why we need it: Add a new property sync to FleetAutoScaler for supporting custom sync interval. See more details in: #1955

    Which issue(s) this PR fixes:

    Closes #1955

    Special notes for your reviewer: None

  • Cpp sdk cmake

    Cpp sdk cmake

    This changeset provides CMake scripts for building C++ SDK that works across Windows, Linux and macOS. Old Makefile will be removed after migrating examples/cpp-simple to CMake. Issue: #134

  • SDK Conformance testing

    SDK Conformance testing

    Add test mode for SDK-server. Local SDK server (Sidecar) now could record client requests. Added test clients and make targets to test Golang and NodeJS SDKs.

    For #672.

  • Add allocator service example and documentation

    Add allocator service example and documentation

    This is a service that allocates a game server from a fleet using the Agones API. It then returns the IP address and port of the allocated game server. I cleaned up the notes I took while making it, and maybe they might provide some useful documentation for people who are looking to programmatically allocate game servers.

    Some things I'm not sure about:

    Is the document create_allocator_service.md more of a Quickstart or a Guide?
    The service in the example uses a container in my public Docker registry...I don't mind, but it might be better off in a repo controlled by this project.
    Step 12 and onward of create_allocator_service might be out of scope.
    The error handling in main.go seem inadequate to me...but maybe it is ok?
    

    Please let me know if this would be useful, and if so, what changes should be made.

  • Update Kubernetes to 1.24

    Update Kubernetes to 1.24

    What type of PR is this?

    Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

    /kind breaking

    /kind bug /kind cleanup /kind documentation /kind feature /kind hotfix

    What this PR does / Why we need it:

    Which issue(s) this PR fixes:

    Closes #2867

    Special notes for your reviewer:

    Change Highlights:

    • Update k8s version of GKE and EKS terraform submodule to 1.24, and recreate the e2e-test-cluster using the new module.
    • Update k8s version of AKS terraform submodule to 1.24.6.
    • Update the k8s version of the prow cluster terraform submodule to 1.24, and recreate the prow cluster.
    • Update kubectl version in build/build-image/Dockerfile and build/e2e-image/Dockerfile to 1.24.9, which is the latest release of 1.24
    • Update the k8s version for Minikube to 1.24.9.
    • Update the Kind image to kindest/node:v1.24.7, which is the latest release of it.
    • Update Config.toml to reflect the version change.
    • Update the k8s image used in the helm pre-delete-hook to lachlanevenson/k8s-kubectl:v1.24.8, which is the latest release of 1.24.
    • In go.mod, update k8s.io/api, k8s.io/apiextensions-apiserver, k8s.io/apimachinery, and k8s.io/client-go to v0.24.9, run go mod tidy to update go.sum, and then run go mod vendor to update vendor.
    • In test/terraform/go.mod, update k8s.io/apimachinery to v0.24.9, and rungo mod tidy to update go.sum.
    • Changes to remove the ClusterName field in the ObjectMeta because it was deprecated
    • Changes to replace k8s.io/apimachinery/pkg/util/clock with k8s.io/utils/clock because of the deprecation.
  • Generate Changelog - Release Automation: Add cloud build target for release builds

    Generate Changelog - Release Automation: Add cloud build target for release builds

    What type of PR is this?

    Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

    /kind breaking /kind bug /kind cleanup /kind documentation

    /kind feature

    /kind hotfix

    What this PR does / Why we need it:

    Created a Make target in release.mk that manually submits a cloud build job The cloud build job generates the CHANGELOG file for both RC and release. The file is stored in a Google Cloud storage bucket so that we can retrieve it to be added to our PR for later.

    Which issue(s) this PR fixes:

    Closes #2460

    Special notes for your reviewer:

    NA

  • Specify port range for gameserver pods specific to a node

    Specify port range for gameserver pods specific to a node

    Hello,

    I have a node running microk8s and a static IP from ISP, using port forwarding we point to that node. Now we want to add two more node. But we have only one static ip.

    So, it is possible to specify port range that gameserver pod will use if it is instantiated in a specific node. Example : node A gameservers pod will have port 7000 to 8000 node B gameservers pod will have port 8001 to 9000 node C gameservers pod will have port 9001 to 10000

    So, that we can port forward port range from 7000 to 8000 to node A, port forward port range from 8001 to 9000 to node B and port forward port range from 9001 to 10000 to node C

    Is there any alternative to solve this issue, then please let me know.

    Thanks

  • Local SDK server returns 500 on player-connect

    Local SDK server returns 500 on player-connect

    Hey, We're trying out the player-tracking feature using the local sdk server, however enabling the feature-flag and setting spec -> players -> initalCapacity in the gamserver yaml makes agones return http 500 on player-connect requests.

    gameserver.yaml:

    apiVersion: "agones.dev/v1"
    kind: GameServer
    metadata:
      name: dev-server
    spec:
      ports:
      - name: default
        portPolicy: Dynamic
        containerPort: 7777
      players:
        initialCapacity: 10
      template:
        spec:
          containers:
          - name: simple-game-server
            image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.14
    

    Starting Agones: ./sdk-server.darwin.arm64 --local --feature-gates PlayerTracking=true -f gameserver.yaml

    Player-connect:

    $> curl -d '{"playerID": "user-123"}' -H "Content-Type: application/json" http://localhost:9358/alpha/player/connect -v
    < HTTP/1.1 500 Internal Server Error
    {"error":"Players are already at capacity","code":2,"message":"Players are already at capacity"}
    

    To make it work I have to set the player-capacity using the API: $> curl -d '{"count": 10}' -H "Content-Type: application/json" -X PUT http://localhost:9358/alpha/player/capacity ...and now the player-connect call works. The installed Agones we run in GKE does not have this behavior, it accepts player-connect calls without requiring the server to explicitly set the capacity using the API.

    Maybe this is related to #2709

    Agones version: agonessdk-server-1.27.0

  • Update Kubernetes to 1.24 #2867

    Update Kubernetes to 1.24 #2867

    What type of PR is this?

    Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

    /kind breaking /kind bug /kind cleanup /kind documentation /kind feature /kind hotfix

    What this PR does / Why we need it: Kubernetes updates

    Which issue(s) this PR fixes:

    Closes #

    Special notes for your reviewer:

  • ARM64 image and charts

    ARM64 image and charts

    Is your feature request related to a problem? Please describe.

    I'm trying to set up XREngine on an ARM64 server, but I can't, since it relies on this and the charts are only AMD64.

    Describe the solution you'd like

    ARM64 images and charts.

    Describe alternatives you've considered

    Doing it myself - it's not going very well.

    Additional context

    N/A

Battleblips - Work in progress multiplayer terminal base battleship game written in Go (with mouse support!) using tcell library
Battleblips - Work in progress multiplayer terminal base battleship game written in Go (with mouse support!) using tcell library

battleblips Work in progress multiplayer terminal base battleship game written in Go (with mouse support!) using tcell library (see https://github.com

Apr 26, 2022
Tcell-game-template - A small template repository for simple tcell based games

tcell game template This is a template repository used for making small terminal

Jan 22, 2022
Tetra3D is a 3D software renderer written in Go and Ebiten and made for games.
Tetra3D is a 3D software renderer written in Go and Ebiten and made for games.

Tetra3D Tetra3D Docs Support If you want to support development, feel free to check out my itch.io / Steam / Patreon. I also have a Discord server her

Dec 20, 2022
Awesome 2D Maze-based games to play with kids in family and with friends on rich console UI. developed into Go.
Awesome 2D Maze-based games to play with kids in family and with friends on rich console UI. developed into Go.

gomazes Have fun time with kids and family and friends at playing awesome 2D maze-based games while feeling like a programmer on the computer console/

Dec 23, 2021
Open source of the build infrastructure used by Stadia Games & Entertainment

SG&E Monorepo This repository contains the open sourcing of the infrastructure developed by Stadia Games & Entertainment (SG&E) to run its operations.

Dec 18, 2022
This project is designed to be an open source implementation for streaming desktop games using WebRTC
This project is designed to be an open source implementation for streaming desktop games using WebRTC

The aim of this project is develop a WebRTC screenshare designed for streaming video games and accepting remote inputs. There will be ansible instruct

Oct 6, 2022
Tetris in Go, as a test in using Go for small games

Tetris in Go This is an attempt at implementing Tetris in Go in a way which has

May 8, 2022
Using finite projective planes to make card (maybe video) games

pairwise What it is Using finite projective plane to generate card (maybe video) games. Running Run with go run . Right now uses Go 1.17 but 1.18 just

Jan 24, 2022
RundQuiz-Game - This is a Go exercise that implements and builds a quiz game from a list of math questions in a CSV file.

Go RundQuiz Game Exercise details This exercise is broken into two parts to help simplify the process of explaining it as well as to make it easier to

Jan 5, 2022
Simple 2D game to teach myself various things about game development and ECS, etc

2d-grass-game I really don't know what to name this game. Its a big grass field, and its in 2d so....2D Grass game This is a simple 2D game to teach m

Jan 17, 2022
Arkanoid game in Go using Ebiten game engine with ECS.
Arkanoid game in Go using Ebiten game engine with ECS.

Arkanoid-go Arkanoid game in Go using Ebiten game engine with ECS. You must have Git LFS installed when cloning the repository to download assets. See

Oct 9, 2022
AircraftWar - a game powered by Go+ spx game engine
AircraftWar - a game powered by Go+ spx game engine

AircraftWar - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download thi

Jan 5, 2022
FlappyCalf - a game powered by Go+ spx game engine
FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this

Nov 6, 2022
FlappyCalf - a game powered by Go+ spx game engine
FlappyCalf - a game powered by Go+ spx game engine

FlappyCalf - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this

Nov 6, 2022
MazePlay - a game powered by Go+ spx game engine
MazePlay - a game powered by Go+ spx game engine

MazePlay - a game powered by Go+ spx game engine How to run Download Go+ and build it. See https://github.com/goplus/gop#how-to-build. Download this g

Dec 16, 2021
A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!
A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy!

galactic-asteroid-belt Overview A simple game that I created with Ebiten game library as a way to teach myself Go. Enjoy! Run To run, you will need Go

Dec 2, 2021
a framework in golang for game server or app server
a framework in golang for game server or app server

einx a framework in golang for game server or app server. a example server for einx (https://github.com/Cyinx/game_server_einx) Features User-Friendly

Dec 8, 2022
Scalable game server framework with clustering support and client libraries for iOS, Android, Unity and others through the C SDK.

pitaya Pitaya is an simple, fast and lightweight game server framework with clustering support and client libraries for iOS, Android, Unity and others

Jan 2, 2023
☸️ Underwater Archaeology game for Kubernetes.

Waterkube Underwater Archaeology game for Kubernetes. Reporting Issues If you are facing a problem with this package or found any bug, please open an

Oct 18, 2022