Godot
This sample project demonstrates how to build a multiplayer game with Godot that integrates with GameFlow. Bullet Mayhem is a 2D 1v1 shooter built with Godot, showcasing the basics of multiplayer game development and how to host a game server with GameFlow using a direct connection (IP and port).

What You'll Learn
- Build dedicated game servers with Godot
- Integrate with Agones SDK for game server management
- Deploy and configure servers on GameFlow
About Agones
GameFlow uses Agones under the hood for game server hosting. Agones is an open-source game server management system that helps with:
- Health Checking: Monitors that your server is running properly
- Player Tracking: Keeps track of connected players
- Server Lifecycle: Manages when servers start and stop
By integrating the Agones SDK into your Godot game, GameFlow can properly manage your servers and track player connections.
Prerequisites
Before starting, ensure you have:
- Access to the Bullet Mayhem repository (Early Adopter access required - contact GameFlow support)
- A GameFlow account
- Basic understanding of Godot and GDScript
Step 1: Clone the Repository
The Bullet Mayhem repository is currently only available to Early Adopters. If you don't have access yet, please reach out to a GameFlow support member.
git clone https://github.com/GameFlowGG/bullet-mayhem
cd bullet-mayhem
Step 2: Download Godot
Download Godot 4.6 Stable from the official website:
👉 Download
Step 3: Open the Project
- Launch Godot 4.6
- Click Import on the project manager
- Navigate to the cloned
bullet-mayhemdirectory - Select the
.godotproject file - Click Import & Edit
Step 4: Install the Agones SDK for Godot
To enable GameFlow's server management capabilities, you need to install the Agones SDK for Godot.
Installation Steps:
-
Visit the Godot Agones SDK repository
-
Download or clone the repository:
git clone https://github.com/AndreMicheletti/godot-agones-sdk -
Copy the
addons/agones_sdkfolder into your project'saddons/directory -
In Godot, go to Project → Project Settings → Plugins
-
Enable the Agones SDK plugin
Step 5: Understanding Agones Integration
The Bullet Mayhem project demonstrates key Agones SDK integration patterns.
Initializing the Agones SDK
When your server starts, initialize the Agones SDK in the _ready() function:
func _ready():
AgonesSDK.start()
# Setup multiplayer callbacks
multiplayer.peer_connected.connect(peer_connected)
multiplayer.peer_disconnected.connect(peer_disconnected)
# Start server if launched with --server flag
if "--server" in OS.get_cmdline_args():
hostGame()
Health Checks
GameFlow needs to know your server is alive and healthy. Send health pings every 60 seconds:
var elapsed_time = 0.0
func _process(delta):
if peer:
elapsed_time += delta
if elapsed_time >= 60.0:
AgonesSDK.health() # Send health ping to Agones
elapsed_time = 0.0
Player Connection Tracking
Track when players connect and disconnect to help Agones manage server capacity:
func peer_connected(id):
if multiplayer.is_server():
AgonesSDK.player_connect(str(id)) # Notify Agones
func peer_disconnected(id):
if multiplayer.is_server():
AgonesSDK.player_disconnect(str(id)) # Notify Agones
Server Initialization
When hosting a game, set the player capacity and mark the server as ready:
func hostGame():
peer = ENetMultiplayerPeer.new()
var error = peer.create_server(server_port, 2)
if error != OK:
return
peer.get_host().compress(ENetConnection.COMPRESS_ZLIB)
multiplayer.set_multiplayer_peer(peer)
AgonesSDK.set_player_capacity(2) # Set max players
AgonesSDK.ready() # Tell Agones the server is ready
Step 6: Export the Game Server and Zip it
To deploy your server to GameFlow, you need to export it as a Linux PCK file:
- In Godot, go to Project → Export
- Click Add... and select Linux/X11
- Click Export PCK/Zip at the bottom
- Use the name
game.pck - Click Save
- Create a .zip file containing your exported PCK file
Step 7: Create a Game on GameFlow
- Log in to your GameFlow account
- Navigate to the Games section
- Click Create New Game
- Fill in the game details:
- Name: Bullet Mayhem
- Description: A 2D 1v1 multiplayer shooter
Step 8: Configure Server Settings
Before uploading your build, configure the server requirements:
- Set Memory to
1GB - Set vCPU to
1 core - Set the Port to
8910(or match yourserver_portvariable if you changed it) - Enable the us-east region (only region supported for now)
Step 9: Deploy and Test
-
Upload Your Build:
- Drag and drop the
gamezipfile into the builds section - Wait for the upload to complete
- Drag and drop the
-
Initialize a Test Server:
- Click Create Test Server
- Wait for the server to spin up (this may take 30-60 seconds)
- Once ready, you'll see the server IP and port
-
Connect and Play:
- Open Godot and run the game locally (not as a server)
- Enter the server IP and port from the GameFlow dashboard
- Click Join
- Open another instance or have a friend join to start the match!

Direct Connection Architecture
Bullet Mayhem uses a direct connection model where:
- The server runs on GameFlow infrastructure
- Players connect directly using the server's IP address and port
- No matchmaking service is required - perfect for testing simple multiplayer games
Troubleshooting
Server Won't Start
- Check that the port (8910) is correctly configured in both code and dashboard
- Review server logs in the GameFlow dashboard
Can't Connect to Server
- Ensure the server status shows as "Ready" in the dashboard
- Verify you're using the correct IP and port
- Confirm the server has available player slots