Phaser is an open source HTML5 framework for 2D games, written in JavaScript/TypeScript. WebGL and Canvas rendering, arcade and matter.js physics, tweens, particles, many plugins. A Phaser game is a plain web page — nothing to compile — so its pipeline is the simplest of all our engines.
Website: https://phaser.io
No bundler, no node_modules. The pinned phaser.min.js and the HTML shell are downloaded at build time, and src/*.js is concatenated in filename order into game.js — prefix files with numbers when load order matters. The repo holds game code only.
Templates are in phaser-tools: copy example-makefile.make to Makefile, set PROJECT and PHASER_VERSION.
| Variable | Description | Default |
|---|---|---|
PROJECT |
Name used in output filenames | phaserdemo |
PHASER_VERSION |
Phaser release from jsDelivr | 3.90.0 |
SRC_DIR |
Game sources | src |
DIST_DIR |
Exported artifacts | dist |
WEB_DIR |
Assembled web bundle | dist/web |
VERSION_FILE |
Version file for CI | .version |
INDEX_HTML_URL |
HTML shell | phaser-tools web/index.html |
make build # node --check on every file in src/
make web # download phaser.min.js + index.html, concat src/*.js
make serve # web bundle on http://localhost:8000 (python3 http.server)
make export VERSION=1.0.0 # dist/web/ zipped as phaserdemo-1.0.0.html.zip
make watch # re-check on change under src/ (needs fswatch)
make clean # remove dist/
Copy example-tasks.json to .vscode/tasks.json. Tasks: Serve (default, Cmd+Shift+B), Build Web, Make build.
| File | Description |
|---|---|
dist/web/ |
Web bundle (index.html, phaser.min.js, game.js) |
phaserdemo-<version>.html.zip |
Web build |
Local only: make, git, jq, zip, curl, node, python3 for make serve, and fswatch for watch mode. CI images bring their own tools.
The pipeline is not in the game repo. Woodpecker asks the update server, and WarpEngine serves the whole config from /build/config (template lib/warp_engine/ci/woodpecker/platforms/phaser/pipeline.yaml.erb).
The repo needs three things:
# .woodpecker.yaml
platform: phaser
name: phaserdemo # only when the software name differs from the repo name
metadata.jsonapplication_token Woodpecker secret: a WarpEngine ApplicationToken with update + upload scopesBuilder images come from the update server's ci_platforms config. Preview the served pipeline:
curl "https://teletypegames.org/build/config?platform=phaser"
| Step | What it does |
|---|---|
| 1. version | the engine's shared step (since WarpEngine 1.7): the version from metadata.json; on a tag a version tag has to match it; outside the repo's default branch and on a dev-<branch> tag dev-<version>-<branch>, with no version dev-<commit>; write .version |
| 2. build | in the phaser-builder image (Node + make/zip/curl, from builder.Dockerfile in phaser-tools): syntax check, download the runtime and shell, assemble and zip |
| 3. upload | on the tag only: POST /build/upload, X-Update-Secret header |
| 4. publish | on the tag only: POST /build/publish?platform=phaser |
| 5. tag | the engine's shared step (since WarpEngine 1.9), after a push only: a new version in the source gets its v<version> tag, whose pipeline runs the steps marked on the tag only; a version tagged already releases nothing; a dev build moves the branch's dev-<branch> tag onto the commit, so the newest dev build is published. See Versions and releases on the WarpEngine page |
Raising the version is the release: a push builds and tags, and the tag's pipeline uploads and publishes (WarpEngine 1.9). A push that leaves the version as it is only builds.
phaser-demo — animated "TELETYPE GAMES" wave text on Phaser 3.90, the same demo as ebitengine-demo.