townengine/docs/wiki/packaging.html
2025-02-16 01:40:17 +03:00

40 lines
1.7 KiB
HTML

<!doctype html>
<html>
<head>
<title>Townengine Wiki : Packaging</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 style="margin-bottom:0in">T3. Packaging<span style="float:right">{twn}</span></h1>
<a href="index.html">Go back
<p><a name="overview"></a><strong>T3.1 </strong><strong>Overview</strong>
<blockquote>
<p>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.
<p>Archives are limited to zip format, with .btw file extension.
<p>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.
<p>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.
<p>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.
<pre>
# 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</pre>
<p>Compilation utility might later be available to combine packs for easier distribution.
</blockquote>
</body>
</html>