T3. Packaging{twn}

Go back

T3.1 Overview

Assets are distributed by packs, which can come in either archived or, for development purposes, folder form. {twn} games operate in a sandboxed filesystem and operate strictly on supplied content.

Archives are limited to zip format, with .btw file extension.

One pack by the name of 'data' is always assumed to be present alongside executable, whether in folder /data/ or /data.btw archive, where precedence is taking over for /data/ folder variant.

Root /data/ could be used to point to other packs in its /packs/data.toml file. It results in a union filesystem, where directory structures are overlaid on top of each other.

Packs which are loaded first have precedence over later ones, preserving their contents. For example, if /assets/foo exists in root /data/, and another /assets/foo is found elsewhere, only the root /data/ version will be available.

# Example of data.toml file
# `deps` array of tables is loaded sequentially, where dependencies of dependencies are processed first before continuing.

[[deps]]
source = "../../common-data" # where does it come from
name = "common-data"         # should be a globally unique identifier

Compilation utility might later be available to combine packs for easier distribution.