EN /HU | Login

Godot

Godot is an open source 2D and 3D game engine with a visual editor. Scripting in GDScript or C#.

Website: https://godotengine.org

Tutorials


Makefile

The Godot editor runs headless and exports the web build (HTML5/WASM) plus the desktop binaries. Templates are in godot-tools:

  • example-makefile.makeMakefile, then set PROJECT
  • example-export_presets.cfgexport_presets.cfg (presets: Web, Windows x86, Windows x64, Linux x64, Mac universal)
  • in Mac universal set application/bundle_identifier

Two settings that are easy to miss:

INI
# project.godot — the arm64 macOS slice fails to export without this
[rendering]
textures/vram_compression/import_etc2_astc=true
INI
# export_presets.cfg, Web preset — no threads, so the game runs without COOP/COEP headers
variant/thread_support=false

Variables

Variable Description Default
PROJECT Name used in output filenames godotdemo
GODOT Godot editor binary godot
EXPORT_PRESET Preset in export_presets.cfg Web
DIST_DIR Artifact directory dist
WEB_DIR Raw web export dist/web
VERSION_FILE Version file for CI .version

Targets

SH
make build                     # godot --headless --import, creates .godot/ cache
make run                       # godot --path .
make web                       # export the Web preset into dist/web/
make export VERSION=1.0.0       # web export packed as godotdemo-1.0.0.html.zip
make binaries VERSION=1.0.0     # all desktop targets
make binary-win-x64 VERSION=1.0.0  # one target only
make watch                     # re-import on .gd / .tscn change (needs fswatch)
make clean                     # remove dist/ and .godot/

build is also a quick "does the project load" check. Run it on a fresh checkout before any export.

Desktop notes:

  • Godot cross-exports every desktop platform from any host, including the linux CI image.
  • macOS is one universal (intel + arm) build. Per-arch export would need custom templates.
  • The .app is ad-hoc signed by Godot (codesign/codesign=1); arm64 macOS refuses unsigned binaries.
  • Windows and Linux embed the .pck in the executable, so each zip holds a single file.
  • Every zip follows the ReleaseAsset convention: one root folder, plus LICENSE and README.md when present.

VS Code

Copy example-tasks.json to .vscode/tasks.json. Tasks: Run (default, Cmd+Shift+B), Edit, Export Web, Make build.

Generated artifacts

File Description
dist/web/ Raw web export (index.html, .js, .wasm, .pck)
godotdemo-<version>.html.zip Web build
godotdemo-<version>-win-x86.zip Windows 32-bit
godotdemo-<version>-win-x64.zip Windows 64-bit
godotdemo-<version>-linux-x64.zip Linux 64-bit
godotdemo-<version>-mac-universal.zip macOS universal .app, ad-hoc signed

Requirements

Local only: make, a Godot 4.x binary with export templates (web + desktop), export_presets.cfg, zip, unzip, and fswatch for watch mode. CI needs nothing in the repo.


Pipeline

Game repos contain no pipeline YAML and no CI make targets. Woodpecker asks the update server, and WarpEngine serves the whole config from /build/config (template lib/warp_engine/ci_templates/godot.yaml.erb).

The repo needs three things:

YAML
# .woodpecker.yaml
platform: godot
  • metadata.json
  • the application_token Woodpecker secret: a WarpEngine ApplicationToken with update + upload scopes
  • name: <software> in the marker only when the software name differs from the repo name

Builder images (e.g. godot-builder:4.7.1) come from the update server's ci_platforms config. Preview the served pipeline:

SH
curl "https://teletypegames.org/build/config?platform=godot"

Steps

Step What it does
1. version read the version from metadata.json, else the git short hash; outside main/master prefix it as dev-<version>-<branch>; write .version
2. build in the godot-builder image: import, export the Web preset, then the four desktop targets; pack each into its own zip
3. upload copy metadata.json to godotdemo-<version>.metadata.json, then POST /build/upload per file with the X-Update-Secret header
4. publish POST /build/publish with name, platform, version

The builder image is godot-ci (headless editor and the matching export templates) with make, zip, unzip and jq added, so no step runs apt-get. It is built from builder.Dockerfile in godot-tools.

SH
curl -X POST -H "X-Update-Secret: <SECRET>" \
  "https://teletypegames.org/build/publish?name=godotdemo&platform=godot&version=1.0.0"

Result

Web build and four desktop targets, each in its own zip, attached to the release as ReleaseAssets and downloadable from the catalog page. The public game index updates itself.