Standalone Asset Pack And Preflight
Purpose
Standalone packing converts authored content and runtime caches into a playable bundle. The preflight step checks the content graph, asset VFS manifest, reward dependencies, source-root freshness, strict diagnostics, and pack diagnostics before the bundle is considered shippable.
Asset Domains And Virtual Paths
The asset VFS maps authored asset paths into virtual paths used by standalone runtime loading. Pack code must use canonical asset paths, not OS-specific local paths. Export settings and assets/config/exported_game.json describe which roots and runtime settings are included in the exported game.
Steps
- Run validation and bake with
--consumer pack-export. - Run
cargo run -p xtask -- pack-export-gate --root . --plan --format markdownto inspect required steps. - Run the pack-export gate without
--planto execute preflight, pack, smoke, and bundle-manifest steps. - Review
standalone_content_preflight_report.jsonandcontent_bundle_manifest.jsonwhen the gate fails. - Fix authored source, asset paths, or bake outputs before rerunning the pack.
Expected Outputs
A clean pack-export gate writes a content bundle manifest, standalone preflight report, packed assets, and any required runtime cache products. Reward dependency reports should make economy, item, gold, currency, XP, and value chains visible before gameplay smoke tests run.
Common Mistakes
Do not pack stale bake output. Do not point standalone code at local source paths that will not exist in the bundle. Do not ignore strict diagnostics because the editor preview can still open. Do not add a new asset domain without updating the VFS manifest and preflight expectations.
Recovery Paths
If virtual paths are missing, update the asset VFS or pack manifest. If preflight reports broken references, repair authored source and rerun validation. If reward reports are wrong, fix the content dependency graph or economy source data. If pack smoke fails after preflight passes, use the generated bundle manifest to confirm the runtime file set.