Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
This plugin adds Agones SDK functionality to GDScript.With this plugin you can call Agones SDK functions using GDScript to create your dedicated server powered by Agones and Godot Engine.
Agones SDK for Godot
Welcome to the community-driven Agones SDK for Godot Engine.
Example
extends Node
var peer = null
func _ready():
if "--server" in OS.get_cmdline_args() or OS.has_feature("Server"):
host_server(DEFAULT_PORT, MAX_PEERS)
func host_server(port, max_peers):
peer = NetworkedMultiplayerENet.new()
peer.create_server(port, max_peers)
get_tree().set_network_peer(peer)
# Initialize AGONES SDK
AgonesSDK.start()
# Agones .Ready()
AgonesSDK.ready()
func _process(delta):
if peer:
# Agones .Health()
AgonesSDK.health()
What is Agones?
Agones is an open source, batteries-included, multiplayer dedicated game server scaling and orchestration platform that can run anywhere Kubernetes can run.
This plugin allows your Godot Scripts communicate with Agones SDK by giving you simple GDScript functions. Internally it works by calling the REST API that comes with Agones Server.
Only GDScript is supported for now
Install
To install this plugin, go to Releases and download the latest version agones-sdk.zip
.
Inside your Godot Project folder, create a folder named addons
and extract the zip file inside it.
After installed, your folder structure will look like this:
Getting Started
Activate the plugin
- Open your project in Godot Editor
- Go to Project > Project Settings... > Plugins
- You should see AgonesSDK Plugin. On the right side, check the "Enable" box
Use the plugin functions
Reference
Type | Syntax | Description |
---|---|---|
func |
.ready(retry, wait_time) |
retry how many times it will retry. wait_time time in seconds to wait between retries |
func |
.health() |
Sends a health check |
func |
.reserve(seconds) |
Reserve for seconds |
func |
.allocate() |
Set GameServer as Allocated |
func |
.shutdown() |
Tells Agones to shutdown server |
signal |
agones_response(success, endpoint, content) |
Emitted when SDK receives an response from Agones. success Boolean if response is sucessfull. endpoint the requested endpoint. content the error message or request body, usually as a Dictionary |
signal |
agones_ready_failed |
Emitted when .ready fails all its attempts. |
Contributing
Contributions are very welcome.
License
Distributed under the terms of the MIT license, "godot-agones-sdk" is free and open source software
This plugin adds Agones SDK functionality to GDScript.
With this plugin you can call Agones SDK functions using GDScript to create your dedicated server powered by Agones and Godot Engine.
Reviews
Quick Information
This plugin adds Agones SDK functionality to GDScript.With this plugin you can call Agones SDK functions using GDScript to create your dedicated server powered by Agones and Godot Engine.