DEMIENGINEDOCUMENTATION Everything is free
Assets & streaming · Game systems

How cook keys work and what output looks like.

Cooking

Cooking turns authored assets into platform-ready output: textures compressed for the GPU, audio encoded, models packed. The result is deterministic — the same sources and settings always cook to the same bytes — and cached so unchanged assets are not redone.

What cooking is

Importing records what a source is; cooking produces what a platform runs. Output lives under generated/cooked/<platform> and is described by a cook.manifest.json. Nothing in that tree is hand-edited or committed — it is derived data, rebuilt whenever inputs change.

demi cook --platform linux

demi cook takes --platform for the target (for example linux or android). It writes cooked files under generated/cooked/<platform> and a cook.manifest.json describing every cooked output. Re-running is incremental: only inputs whose cook key changed are redone.

Cook keys

Each asset's cook key is the fingerprint of everything that can change its output. If any part changes, that asset recooks; if none do, the previous output is reused.

Key partWhy it matters
Importer ID and versionA new importer build can produce different bytes from the same source
Manifest settingsFiltering, compression, streaming, and platform overrides change the output
Source hashesThe source file content itself (recorded at import as source_hash)
PlatformAndroid and Linux cook different texture and audio formats
Package provenanceAssets that came from a package are keyed by that package's identity and version

This is why reimport after editing a source matters: cooking reads the recorded hash, and a stale hash means a stale cook.

Cook output

generated/cooked/linux/
  textures/skyforge_rune.bin
  audio/skyforge_theme.bin
  models/skyforge_rune.bin
  cook.manifest.json
  • generated/cooked/<platform>/ — cooked files, laid out by asset ID. Derived data only; safe to delete and recook.
  • cook.manifest.json — the index: which asset cooked to which file, with hashes and dependencies. Shipping and validation read this; do not edit it.

The platform name in the path matches the --platform you passed. Cook Linux and Android as two separate trees; one never substitutes for the other.

When to cook

demi validate games/skyforge
demi cook --platform linux

Validate the project first — demi validate checks the project and every reachable source and reports schema and reference errors. Cook only what you are about to run or ship. Playtesting on the same platform usually cooks implicitly through demi run; an explicit cook is for CI, packaging, and checking a clean rebuild. Package builds require a successful cook for their exact target, as described in Linux bundles and Android builds.

Determinism

The same sources, settings, importer versions, and platform always produce the same cooked bytes and the same manifest hashes. That is what makes two cooks comparable and what lets published packages carry verifiable checksums. If a cook output differs unexpectedly, one of the key parts above changed — start with source_hash and manifest settings.

Next steps