makepad/skills/makepad-game-director/scripts/probe_assets.sh
Arena Agent fe21c07d84 skills: add Makepad game skills pack ported from threejs-game-skills
Nine agent skills for building Makepad/Rust games, ported from
majidmanzarpour/threejs-game-skills. Same director-routed workflow and
premium bar; runtime rewritten for this fork's game crates.

- makepad-game-director        entrypoint, routing, continuity, asset probe
- makepad-gameplay-systems     loop, movers vs rigid bodies, input, camera, netplay
- makepad-aaa-graphics-builder lighting, shaders, budget, visual scorecard
- makepad-game-ui-designer     HUD, menus, touch and XR UI
- makepad-debug-profiler       defect bisection and profiling
- makepad-qa-release           verification ladder, evidence, packaging
- makepad-3d-generator         CC0 model search, casts, procedural geometry
- makepad-image-generator      texgen textures, palettes, sky, icons
- makepad-audio-generator      sample bank, mixer, material impacts, 3D audio

Written against the real APIs in libs/game/*, libs/sim and apps/arcade:
the game.* verb table, GameRenderer adaptive quality, the packed 6-float
GameMeshVertex layout, script_mod! splash styling, makepad-test driving,
and the BUDGETS.md numbers. No paid generation API is required - the CC0
library plus seeded makepad-game-gen replaces them.

Includes install.sh (Codex/Claude), validate-skills.sh and a repo-aware
probe_assets.sh; both scripts verified against this checkout.
2026-09-05 21:18:58 +00:00

89 lines
3.3 KiB
Bash
Executable file

#!/usr/bin/env bash
# Probe what this checkout can actually build with, before planning asset work.
# Prints a short report; never downloads anything, never fails the caller.
set -uo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
cd "$repo_root" || exit 0
say() { printf '%s\n' "$*"; }
hr() { printf -- '---\n'; }
say "Makepad game asset probe"
say "repo: $repo_root"
hr
# --- toolchain -------------------------------------------------------------
if command -v cargo >/dev/null 2>&1; then
say "cargo: $(cargo --version 2>/dev/null)"
say "rustc: $(rustc --version 2>/dev/null)"
else
say "cargo: MISSING - nothing in this pack can be verified without it"
fi
command -v ffmpeg >/dev/null 2>&1 \
&& say "ffmpeg: present (download_assets.sh --transcode available)" \
|| say "ffmpeg: absent (ogg->wav transcode unavailable; decoder still works)"
hr
# --- game crates -----------------------------------------------------------
say "game crates present:"
for c in render gen blocks audio script net session coedit pkg assets; do
if [ -f "libs/game/$c/Cargo.toml" ]; then
say " ok libs/game/$c"
else
say " MISSING libs/game/$c"
fi
done
[ -f "libs/sim/Cargo.toml" ] && say " ok libs/sim" || say " MISSING libs/sim"
[ -f "libs/sim/math/Cargo.toml" ] && say " ok libs/sim/math" || say " MISSING libs/sim/math"
[ -f "apps/arcade/Cargo.toml" ] && say " ok apps/arcade" || say " MISSING apps/arcade"
hr
# --- asset library ---------------------------------------------------------
res="apps/arcade/resources"
if [ -d "$res" ]; then
say "resources dir: $res"
[ -f "$res/MIRROR.toml" ] && say " MIRROR.toml present ($(grep -c '^\[' "$res/MIRROR.toml" 2>/dev/null || echo '?') entries)"
[ -f "$res/CREDITS.toml" ] && say " CREDITS.toml present"
else
say "resources dir: absent"
fi
found_assets=0
for d in "$res/assets" "$res/models" "$res/packs" apps/arcade/assets; do
if [ -d "$d" ]; then
n_glb=$(find "$d" -type f \( -name '*.glb' -o -name '*.gltf' \) 2>/dev/null | wc -l | tr -d ' ')
n_aud=$(find "$d" -type f \( -name '*.ogg' -o -name '*.wav' \) 2>/dev/null | wc -l | tr -d ' ')
say " $d: $n_glb models, $n_aud sounds"
found_assets=$((found_assets + n_glb + n_aud))
fi
done
if [ "$found_assets" -eq 0 ]; then
say ""
say "NO ASSETS DOWNLOADED."
say "The game still runs on primitives and asset-dependent tests skip."
say "For real geometry, fetch once:"
say " ./apps/arcade/download_assets.sh # core, ~75 MB"
say " ./apps/arcade/download_assets.sh --packs=all # full, ~185 MB"
say "Or generate procedurally with makepad-game-gen (no download needed)."
else
say ""
say "Assets present. Search by DESCRIPTION via makepad-game-assets (find_model /"
say "find_cast), never by filename. Ids look like kenney/racing/vehicle-truck-yellow."
fi
hr
# --- fetch script ----------------------------------------------------------
if [ -x "apps/arcade/download_assets.sh" ]; then
say "download_assets.sh: executable"
elif [ -f "apps/arcade/download_assets.sh" ]; then
say "download_assets.sh: present, not executable (run: chmod +x apps/arcade/download_assets.sh)"
else
say "download_assets.sh: absent"
fi
say ""
say "No paid API key is required by this pack. Library is CC0; gaps are filled"
say "procedurally with makepad-game-gen."
exit 0