TITLE=TIC-80 ROUTE=/platforms/tic80 LOCALE=en MODIFIED=1792476547 URL=https://wiki.teletypegames.org/platforms/tic80 TIC-80 is a tiny fantasy computer for small games. Code, sprites, maps, sound and music are all edited inside it. bWebsite:0 https://tic80.com bTools repository0: https://git.teletypegames.org/build/tic80-tools r────────────────────────────────────────────────────────────────────────────── 1Makefile 1════════ A cartridge is one c.lua0 file. To keep the code modular, we split it into many files and concatenate them at build time. p project-root/ p ├── inc/ p │ ├── core.lua p │ ├── player.lua p │ └── world.lua p ├── impostor.inc # build order, one file name per line p ├── Makefile p └── README.md cimpostor.lua0 is generated. Order matters: a file must come after the globals it uses. 2Targets 2─────── p make build # concatenate inc/ files into .lua p make minify # shrink the code, backup to .original.» p lua p make export VERSION=1.0.0 # build + minify, then save .tic and .html.zip p make export_assets # PALETTE/TILES/SPRITES/MAP/SFX/WAVES -> inc/met» p a/meta.assets.lua p make import_assets # import assets//*.png into the cartridge p make watch # rebuild on change in inc/, the .inc file and a» p ssets/ p make lint # luacheck, with line numbers mapped back to sou» p rce files p make docs # ldoc HTML into docs/ p make install_precommit_hook # .git/hooks/pre-commit runs make lint p make clean # remove generated files cexport0 also copies the versioned files to unversioned names (cimpostor.tic0, cimpostor.html.zip0). cexport_assets0 keeps the graphics in version control as source code. 2VS Code 2─────── Copy cexample-tasks.json0 from the tools repo to c.vscode/tasks.json0 and replace cimpostor.lua0 with your cart name. Tasks: bRun TIC800 (default, cCmd+Shift+B0), bBuild & Run TIC800, bExport assets0, bMake build0. 2Generated artifacts 2─────────────────── t┌───────────────────────────┬─────────────────────────────────────┐ t│h File t│h Description t│ t├───────────────────────────┼─────────────────────────────────────┤ t│0 c.lua0 t│0 Merged (and minified) source t│ t│0 c.original.lua0 t│0 Pre-minification backup t│ t│0 c.tic0 t│0 Cartridge t│ t│0 c.html.zip0 t│0 HTML build t│ t│0 c-*-docs.zip0 t│0 Documentation t│ t│0 c-*-win-x64.zip0 t│0 Windows player, cart baked in t│ t│0 c-*-linux-x64.zip0 t│0 Linux player, cart baked in t│ t│0 c-*-mac-x64.zip0 t│0 macOS (Intel) player, cart baked in t│ t└───────────────────────────┴─────────────────────────────────────┘ 2Requirements 2──────────── Local only: cmake0, ctic800 in cPATH0, clua0, cluacheck0, cldoc0, ccurl0, and cfswatch0 for watch mode. CI installs its own tools. r────────────────────────────────────────────────────────────────────────────── 1Pipeline 1════════ The pipeline is not in the game repo. Woodpecker asks the update server for it, and WarpEngine serves the whole config from c/build/config0 (template clib/warp_engine/ci/woodpecker/platforms/tic80/pipeline.yaml.erb0). The repo needs three things: p # .woodpecker.yaml p platform: tic80 • cname: 0 — only when the software name differs from the repo name • the capplication_token0 Woodpecker secret: a WarpEngine ApplicationToken with cupdate0 + cupload0 scopes, created in the admin TIC-80 projects have bno cmetadata.json0. The version and the catalog metadata come from the comment header in cinc/meta/meta.header.lua0. See the exact commands: p curl "https://teletypegames.org/build/config?platform=tic80" 2Steps 2───── t┌─────────────┬──────────────────────────────────────────────────────────────┐ t│h Step t│h What it does t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 1. version t│0 csed0 the c-- version:0 comment from cinc/meta/meta.header.lua0; t│ t│0 t│0 add a cdev-0/branch suffix outside main t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 2. lint t│0 cluacheck0 in the ctools0 image (cci-tools0 on teletypegames.org, t│ t│0 t│0 luacheck and ldoc preinstalled; without one, calpine0 + t│ t│0 t│0 cluarocks install0 on every run); merge cinc/0 in c.inc0 order t│ t│0 t│0 with a line map; fail on any issue t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 3. minify t│0 concatenate and minify with clua-minify-tic800; keep the t│ t│0 t│0 original for docs t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 4. docs t│0 cldoc0 on the pre-minification source, zipped as t│ t│0 t│0 c--docs.zip0 t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 5. export t│0 in the ctic80pro0 image: save the c.tic0 cart and export t│ t│0 t│0 c.html.zip0 t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 6. binaries t│0 cexport win / linux / mac0 with the cart baked in, one zip per t│ t│0 t│0 slug; templates are downloaded from tic80.com, so this step t│ t│0 t│0 needs network t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 7. upload t│0 cPOST /build/upload0 per file, cX-Update-Secret0 header from t│ t│0 t│0 capplication_token0 t│ t├─────────────┼──────────────────────────────────────────────────────────────┤ t│0 8. publish t│0 cPOST /build/publish?platform=tic800 t│ t└─────────────┴──────────────────────────────────────────────────────────────┘ The builder image (ctic80pro0) and the tools image come from the update server's cci_platforms0 config, not from the repo. With cci-tools0 the lint step went from 10–15 s to 3 s and the docs step from 12–14 s to 1 s. 2Result 2────── Linted, minified, versioned build; docs and native players attached as ReleaseAssets; the public game index updates itself. All build logic lives server-side — the repo carries only the marker and its token. r────────────────────────────────────────────────────────────────────────────── 1Builder image 1═════════════ TIC-80 Pro is a commercial product, sold on bitch.io0. The source is open, so with a license you can build your own Pro binary in a clean image. p FROM ubuntu:24.04 p p RUN apt-get update && apt-get install -y \ p build-essential cmake git \ p libsdl2-dev libpipewire-0.3-dev libwayland-dev \ p ruby-dev lua5.4 libcurl4-openssl-dev \ p && rm -rf /var/lib/apt/lists/* p p RUN git clone --recursive https://github.com/nesbox/TIC-80 /opt/TIC-80 p RUN cd /opt/TIC-80/build \ p && cmake -DBUILD_PRO=On -DBUILD_SDLGPU=On -DBUILD_WITH_ALL=On -DBUILD_ST» p ATIC=On .. \ p && cmake --build . --parallel p p ENV PATH="/opt/TIC-80/build/bin:${PATH}" p WORKDIR /workspace p CMD ["/bin/bash"] t┌────────────────────────────────────┬───────────────────────────────────────┐ t│h Flag t│h Why t│ t├────────────────────────────────────┼───────────────────────────────────────┤ t│0 cBUILD_PRO=On0 t│0 enables the Pro features t│ t├────────────────────────────────────┼───────────────────────────────────────┤ t│0 cBUILD_SDLGPU=On0, cBUILD_WITH_ALL=On0 t│0 GPU support and every optional t│ t│0 t│0 feature t│ t├────────────────────────────────────┼───────────────────────────────────────┤ t│0 cBUILD_STATIC=On0 t│0 one portable binary, no shared t│ t│0 t│0 library surprises t│ t└────────────────────────────────────┴───────────────────────────────────────┘