When starting a new project, find-and-replace all starter-template occurrences
(assembly name, Docker binary, DTLS cert CN, README title).
Godot 4.4 + C# template with Git LFS, csharpier, and a dedicated authoritative server (ENet + DTLS) for local Docker Compose. A capsule pawn demonstrates client-side prediction and remote interpolation; replace it with your game.
- Godot .NET / C# — see
.godot-versionfor the required version. - .NET SDK
- Docker Desktop (for local dedicated server)
- Export templates for Godot (install from the editor if prompted)
The game server runs as a separate headless process. Run from repo root.
Requires Docker Compose 2.22+ (included in current Docker Desktop) for watch mode.
./run build # build and start (detached)
./run logs # follow server output
./run watch # rebuild on C# / scene / asset changes
./run stop # graceful SIGTERM stop
./run down # tear down compose stackOn Windows, use Git Bash or WSL to run ./run, or use the
docker compose commands below.
./run build
# or: docker compose up --build -d game-serverThis builds and runs the game-server container on UDP port 7000 with
--dev-mode (stub session validation). docker-compose.yml passes
GODOT_EXPORT=debug so the server matches an editor client (Debug C# RPC
layout). For a production-style image:
docker compose build --build-arg GODOT_EXPORT=release game-server
docker compose up -d game-serverThe image copies the whole Linux server export folder (binary, .pck, and
data_* .NET runtime) — Godot’s default layout when Embed PCK is off.
After a successful start you should see [Bootstrap] dedicated_server=True ...
and Server started on port 7000 (DTLS enabled).
Editor client + Docker server: use the default compose build (GODOT_EXPORT=debug).
A release server against an editor client will fail RPC checksum negotiation.
After any networking/C# change, rebuild (./run build) or leave
./run watch running.
Do not pass --log-file on Godot 4.4.1 here — it can crash the headless binary
at startup.
Stop:
./run down-
Open the project in Godot (see
.godot-version). -
Rebuild the server image if you changed C# since the last build (or use
./run watch). -
Use the Lobby with address
127.0.0.1:7000, or skip the Lobby:--connect=127.0.0.1:7000(Project → Debug → Customize Run Arguments in the editor.)
-
The editor enables
--dev-modehandshake automatically; exported clients should pass--dev-modeor setGAME_SESSION_VALIDATE_DISABLED=1.
docker build -f docker/server/Dockerfile -t starter-template-server .
docker run --rm -p 7000:7000/udp starter-template-serverNative headless (exports a Linux binary; prefer Docker on Windows):
mkdir -p build
godot --headless --path . --export-release "Server Linux" build/starter-template-server
./build/starter-template-server --headless --server --dev-modedotnet build starter-template.csproj
dotnet tool restore
dotnet csharpier .
dotnet csharpier --check .Conventions for contributors and AI assistants: AGENTS.md.