Examples

List of available code examples

Configuration files

These are full examples for each of the resource types of Agones

Game server implementations

These are all examples of simple game server implementations, that integrate the Agones game server SDK.

  • Simple gameserver (Go) - simple server that responds to TCP connections or UDP packets on the same port.
  • CPP Simple (C++) - C++ example that starts up, stays healthy and then shuts down after 60 seconds.
  • Node.js Simple (Node.js) - A simple Node.js example that marks itself as ready, sets some labels and then shutsdown.
  • Rust Simple (Rust) - A simple Rust example that marks itself as ready, sets some labels and then shutsdown.
  • Unity Simple (Unity3d) - This is a very simple “unity server” that doesn’t do much other than show how the SDK works in Unity.
  • Xonotic - Wraps the SDK around the open source FPS game Xonotic and hosts it on Agones.
  • SuperTuxKart - Wraps the SDK around the open source racing game SuperTuxKart, and hosts it on Agones.
  • Custom-Controller (Go) - A custom controller for Agones designed to log GameServer details on insert, update, or delete, demonstrating how to build your own controller.

Building on top of Agones

Game Server Allocation

Integrations with other projects


Custom Controller for Agones Game Servers

This Custom Controller example shows how to create, deploy and run a Custom Kubernetes Controller for Agones that logs changes to GameServers and modifies their labels.

Build and Run a Simple Game Server that Connects to an Inference Server

This example shows how to set up a simple game server that integrates with your inference server’s GenAI endpoints. You can either interact with one GenAI endpoint via TCP, or set up two endpoints to “chat” to each other.

Deploying and Running SuperTuxKart Server Using Agones

This SuperTuxKart example shows how to set up, deploy, and manage a SuperTuxKart game server on a Kubernetes cluster using Agones. It highlights an approach to integrate with existing dedicated game servers.

Deploying and Running Xonotic Server Using Agones

This Xonotic example shows setting up, deploying, and managing a Xonotic game server on a Kubernetes cluster with Agones. It uses a simple Go wrapper to connect existing game servers with Agones, making it straightforward to run games in the cloud.


Last modified April 17, 2024: Xonotic Example on Agones Site (#3742) (7f7e642)