Skip to content

Repository files navigation

Game Visual Forge

English | 简体中文

Game Visual Forge is a repository-local collection of four Codex Skills for game-ready 2D visual assets and explicitly requested game audio: maps, sprites, video-to-sprite animation, and reviewed sound effects.

Skills

Skill Use it for Typical output
forge-2d-map Playable 2D maps, Tilemaps, terrain, props, collision, and Unity handoff Map bundle, preview, placement data, quality evidence
forge-2d-sprite Characters, creatures, NPCs, props, effects, and animation sheets Clean sprite sheets, frames, GIF previews, metadata
forge-video-to-sprite Turn existing, MiniMax Hailuo, Jimeng, or optional ComfyUI MiniMax H3 video into sprite frames. Extracted frames, sprite strips, GIF previews, metadata
forge-text-audio Explicitly requested SFX, UI sounds, action sounds, and ambience Reviewed 44,100 Hz 16-bit PCM WAV and Unity AudioClip manifest

What it provides

  • Natural-language intake with explicit choices for style, layout, runtime, and delivery format.
  • Built-in image generation when a new visual asset is needed, plus support for user-provided source media.
  • Deterministic local processing, validation reports, and reproducible output manifests.
  • Playable map handoff with walkability, collision, objects, entrances, and Unity Tilemap support.
  • Native map atlases are normalized to the declared grid, tile size, margins, and spacing before validation. This standardizes atlas geometry only; it does not repair artwork, seams, or map topology.
  • Provider, cost, and submission confirmation gates for paid or external work.
  • forge-video-to-sprite processes existing video locally with FFmpeg/FFprobe, timestamp sampling, rembg/Chroma cleanup, stable alignment, strips, sheets, GIF previews, and motion-quality evidence.
  • Generated video routes support explicit existing, MiniMax Hailuo, Jimeng, or optional ComfyUI MiniMax H3 selection; tools and credentials are configured manually and never switched automatically.
  • forge-text-audio uses the official local Stable Audio 3 small-sfx model through the isolated stable-audio-3 runtime. It supports text-to-audio, redraw, inpaint, and continue modes, with WAV-only delivery and a final listening review.

Showcase

Adaptive river crossing map in Unity

HD background removal comparison

HD cleanup uses Pillow for image conversion, NumPy/SciPy for masks, rembg with the birefnet-general model for semantic separation, known-magenta spill reconstruction, and optional PyMatting refinement. If CUDA fails, the processor tries CPU and reports a deterministic Chroma fallback when needed.

Install optional cleanup tools manually:

python -m pip install -e ".[image]"
python -m pip install -e ".[background]"
python -m pip install "rembg[cpu]"
python -m pip install "rembg[gpu]"
python -m pip install -e ".[matting]"
python -c "from rembg import new_session; new_session('birefnet-general')"

Use U2NET_HOME for a shared model directory. CPU is the compatibility default; GPU requires a verified CUDA environment. PyMatting is optional and slower.

Stable Audio 3 examples

Generated with forge-text-audio and the official stabilityai/stable-audio-3-small-sfx model.

Wooden UI click

Prompt:

Dry wooden UI click, short transient, no music, no voice

Listen to the wooden UI click

Stable Audio 3 wooden UI click waveform

Stable Audio 3 wooden UI click spectrum

Blacksmith hammer sound

Prompt:

TrackType: SFX, a clean professional studio Foley recording of one natural strike of a small steel blacksmith hammer against a red-hot iron billet on a solid anvil, an isolated metallic impact with a fast attack and a short clean natural decay, recorded with a dry close microphone in a quiet room.

Implementation and validation: generated locally with Stable Audio 3 Small-SFX, exported through no-boost WAV processing, and passed format, clipping, and sustained-noise checks.

Install

The unified guide contains both a copyable Agent request and the complete manual installation flow. It installs the four core Forge Skills only. Optional workflows are opt-in. The Agent asks whether to enable them, inspects first, then asks again before installing missing components.

Provider setup stays separate from core Skill installation. Core installation does not auto-install providers, FFmpeg, credentials, model weights, or optional workflow dependencies.

To delegate the optional audio runtime setup to an Agent, copy this request:

Install and configure the official stable-audio-3 runtime for forge-text-audio: ask me to choose the installation directory, keep the isolated Python environment, model weights, and all caches under that directory, require me to accept all licenses personally, never use a hosted API, run the repository's provider configure command without changing user environment variables or PATH, and finish by running and reporting the local offline preflight.

Detailed instructions are in Stable Audio 3 setup. The ignored game-visual-forge.local.json stores only local paths; provider configure creates it. License acceptance remains a user action.

Example requests

Use forge-2d-map to create a top-down village with a north-south creek,
one walkable wooden bridge, building entrances, collision, and a Unity Tilemap.
Use forge-2d-sprite to create a modern pixel-art player walk sheet with
transparent output and a preview GIF.
Use forge-video-to-sprite with my existing MP4 and export a feet-aligned
24-frame sprite strip plus a preview GIF.
Use forge-video-to-sprite with local ComfyUI MiniMax H3, optimize an I2VA
prompt from my first frame, then export aligned 16- and 32-frame sprite sheets.
Use forge-text-audio to create three dry iron-sword impacts against a steel
shield, no music or voice, review the candidates, and prepare a Unity AudioClip.

For local video processing, install FFmpeg and FFprobe yourself. MiniMax Hailuo API uses MINIMAX_API_KEY; Jimeng API uses JIMENG_ACCESS_KEY and JIMENG_SECRET_KEY. The official mmx and dreamina CLIs are optional.

Unity integration

The Tilemap package lives at integrations/unity/com.game-visual-forge.tilemap and imports validated Tilemap bundles into textures, Tiles, Palettes, and Tilemap Prefabs. The independent audio package lives at integrations/unity/com.game-visual-forge.audio and imports reviewed WAV bundles as configured AudioClip assets without changing scenes. Scene placement is performed through Unity MCP only after an explicit request.

Repository layout

skills/       Codex Skill instructions and launchers
src/          Shared contracts, routing, processing, and reports
integrations/ Unity Tilemap and audio packages plus tests
assets/       Small checked-in examples and showcase artifacts
install/      Unified installation and independent runtime guides

Development check

Run the test suite from the repository root (the directory that contains tests/):

Set-Location "game-visual-forge项目路径"
python -m unittest discover -s tests -q

License

MIT

About

Production-ready Codex Skills for generating 2D game maps, sprites, and video-to-sprite animations, with deterministic validation and Unity integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages