Skip to content

GotA browser asset packer ignores POLYWORLD_ART #103

Open

Description

@JBoggsy

What happens. coworld/tools/build_replay_viewer.nim and src/polyworld/emscripten.nims
honour POLYWORLD_ART and pass it to the GotA packer (pack_assets ART CACHE). The packer
still reads the character library from the default sibling checkout, so a build with the art
anywhere else fails:

cannot open ../polyworld_art/characters/chargen/manifest.json

Repro.

  1. Check out Metta-AI/polyworld_art at the coworld/assets.json revision somewhere other than
    <repo>/../polyworld_art, and make sure that sibling path does not exist.
  2. export POLYWORLD_ART=/path/to/polyworld_art
  3. bash coworld/gota/tools/build_replay_viewer.sh /abs/output

Cause. examples/gods_of_the_arena/assets.nim builds its asset list from DataRoot
(src/polyworld/common.nim), which is the constant "../polyworld_art" in native builds, so
generatedCharacterAssets() and other declarations resolve relative to the working directory
rather than the packer's art-root argument. ChargenLibrary in src/polyworld/chargen.nim is a
similar compile-time sibling path.

Workaround. Symlink the art checkout to <repo>/../polyworld_art.

Suggested fix. Resolve asset declarations against the art root passed to the packer (or
read POLYWORLD_ART in DataRoot for native tools), and add a build check that runs the packer
with the art outside the sibling path.

Found while building the replay viewer for #102.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions