agent-sprite-forge README

The project's README from github.com/0x0funky/agent-sprite-forge. As one markdown file: README.md.

Agent Sprite Forge

Languages: English | 繁體中文 | 简体中文 | 日本語 | 한국어

Agent Sprite Forge banner

Codex skills for game-ready 2D sprites, layered maps, and engine-ready prototypes.

Ask in natural language. Codex plans the asset pipeline, renders with built-in image generation, then local processors clean, split, validate, and export assets for Godot, Unity, or raw 2D game workflows.

Showcase · Skills · Install · Prompts · Star History

What Makes It Different

Agent Sprite Forge is not just a folder of prompts. It is a Codex-first 2D game asset workflow where the agent decides the plan, image generation creates the raw visuals, and deterministic scripts turn those visuals into reusable game assets.

Sprite sheets
Characters, monsters, props, attacks, spells, projectiles, impacts, idles, walks, and reference-guided variants.
Layered maps
Ground-only bases, dressed references, prop packs, transparent props, y-sort placement, collision, zones, and previews.
Engine handoff
Godot scenes, editable TileMap layers, separated props, encounter grass, collision bodies, exits, and debug players.
Local cleanup
Chroma-key removal, frame extraction, alignment, transparent PNG/GIF export, prop-pack slicing, and QA metadata.

Showcase

Engine-Ready Prototypes

These examples were assembled with Codex using agent-sprite-forge workflows. They are meant to show the full loop: generated assets, structured scene data, and playable prototype wiring.

Summon Survivors Unity WebGL gameplay
Summon Survivors — Unity WebGL
Generated map art, hero sheets, summons, evolutions, enemies, bosses, pickups, HUD, FX, level-up choices, and WebGL deployment.
Play build · Build conversation
Forest Pass Defense Godot tower-defense map
Forest Pass Defense — Godot Tower Defense
A Godot 4 prototype with map, separated props, tower slots, towers, enemy sheets, boss/flying enemies, waves, HUD, build/upgrade/sell flow, projectiles, and targeting rules.
Generate2DMap Godot editor scene
Editable RPG Map — Godot TileMap
Image-generated tileset and prop sheet wired into editable TileMapLayer, Sprite2D props, encounter grass Area2D, StaticBody2D collision, exits, metadata, and debug player/camera.
Neon Breach cyberpunk side-scroller
Neon Breach — Cyberpunk Side-Scroller
A playable side-scroller prototype built around generated character, attack, map, and gameplay assets.
Sengoku Era JavaScript RPG starter selection
Sengoku Era — JavaScript Pokémon-like
A browser-based RPG prototype with generated characters, starter selection, map flow, and battle UI.
Play build
Sengoku Era JavaScript RPG battle scene
Starter selection and battle loop
A compact JavaScript game showcase built from sprite, monster, battle, and map assets generated through the skill workflow.
More Godot tower-defense output
Forest Pass Defense enemy roster
Enemy roster, including flyer and boss units
Forest Pass Defense tower icons
Tower lineup
Forest Pass Defense HUD icons
HUD and gameplay icons

Godot prototype output includes:

  • scenes/ForestPass.tscn with base map, separated props, enemy paths, tower slots, and HUD nodes.
  • Six tower families with generated tower art and upgrade stages.
  • Animated enemy sheets for ground units, flying units, and boss encounters.
  • Wave, difficulty, tower catalog, collision, route, and tower-slot metadata.
  • Runtime build, upgrade, sell, projectile, and targeting behavior connected in Godot.
image_gen map + separated props + tower sheets + enemy animation sheets + HUD icons + Godot gameplay wiring
More Unity survivors-like output
Summon Survivors Unity WebGL gameplay with summons, enemies, pickups, HUD, and objective
Unity WebGL gameplay: summons, enemies, pickups, HUD, and objective flow
Summon Survivors Unity WebGL level-up menu
Level-up choices: summon unlocks, training, stats, and recovery

Unity prototype output includes:

  • Assets/Survivors/Scenes/SummonSurvivors.unity as the playable scene.
  • SurvivorContentDatabase.asset connecting generated hero, summon, enemy, pickup, HUD, and FX sprites.
  • Starter summon selection, survival objective, XP/coin pickups, level-up choices, summon training, and evolution flow.
  • Enemy spawning pressure, boss timing, projectile attacks, area damage, health bars, and score tracking.
  • WebGL build output under Builds/WebGL with Vercel deployment config.
image_gen map + directional hero sheets + summon/evolution sheets + enemy sheets + FX/HUD icons + Unity runtime + WebGL deploy

Sprite Sheets And FX

Use $generate2dsprite when you need animated units, playable characters, monsters, props, spell bundles, projectile/impact FX, or reference-guided variants.

Goku Kamehameha sprite animation
Text to sprite
Attack animation from a plain-language request.
Naruto Rasengan sprite animation
Character action
Compact 2D action sheet with transparent export.
Fire mage cast animation
Spell cast
Bundle-friendly cast animation.
Fire mage projectile animation
Projectile
Matching projectile / impact workflows.
Samurai walking down
Down
Samurai walking left
Left
Samurai walking right
Right
Samurai walking up
Up
Reference crocodile
Reference
Crocodile playing with a stone
Reference-guided sprite animation
Reference male character
Reference
Male character teaching animation
Reference-guided character action

Layered RPG Map Pipeline

Use $generate2dmap when you need maps instead of isolated sprites. For readable layered raster maps, the current workflow prefers a clean hand-painted HD game-map style: ground-only base first, dressed reference second, prop pack third, then transparent prop extraction and layered preview composition.

Ground-only cyberpunk canal RPG base map
Ground-only base
Dressed cyberpunk canal reference map
Dressed reference
Generated 3x3 cyberpunk canal prop pack
3x3 prop pack

Layered cyberpunk canal RPG map preview
Flattened layered RPG map preview

layered_raster + y_sorted_props + precise_shapes + trigger_zones + raw_canvas

Godot Editable TileMap Export

$generate2dmap can also produce an editable Godot map project instead of a single flattened image. This showcase uses an image-generated tileset and 3x3 prop sheet, then wires them into a Godot 4.5 scene.

Generate2DMap Godot editor scene with editable TileMapLayer and nodes
Godot editor scene: editable layers, props, zones, collision, exits, and debug player

Godot meadow layered RPG map preview
Layered map preview
Godot meadow debug preview with collision and zones
Collision and zone debug overlay
Image-generated Godot meadow tileset atlas
Image-generated tileset atlas
Image-generated 3x3 meadow prop pack
3x3 generated prop pack

Godot output includes editable TileMapLayer nodes, independent Sprite2D props, encounter grass Area2D zones, StaticBody2D collision blockers, exit Area2D zones, and a debug player/camera.

image_gen tileset + prop_pack_3x3 + layered_tilemap + separate_props + trigger_zones + Godot_TileMap

Playable Game Prompt Examples

Cyberpunk side-scroller prompt
use $generate2dsprite to create a 2D side-scrolling game similar to Mega Man. It should include attack mechanics, map elements, and all the essential features. I would like you to design it, and all the necessary assets should be created using this skill. It needs to be an actually playable game, with a cyberpunk story setting.
Sengoku Pokémon-like prototype

Link: Play the JavaScript browser build

Sengoku starter selection screen
Starter selection
Sengoku battle screen
Battle scene
Use $generate2dsprite to create a 2D game similar to Pokemon. You only need to build one scene for now. It must include a starter monster selection mechanic, a battle screen, and all basic gameplay functions. I would like you to design all the elements and the story, and you can also decide which game engine to use. Use this skill to create any assets you need. The story should be set in the Sengoku period.

Included Skills

Skill Use it for Output Runtime
generate2dsprite Sprites, animation sheets, props, spell bundles, FX, reference variants, optional layout guides for fixed-frame sheets Raw sheet, cleaned transparent sheet, frames, GIFs, metadata Codex / Grok (image gen)
generate2dmap Baked maps, layered raster maps, clean HD RPG maps, prop packs, collision/zones, Godot-editable scenes Base map, dressed reference, prop pack, extracted props, preview, scene metadata Codex / Grok (image gen)
video2dsprite Denser motion sprites from video: base still → image_to_video → frame extract → magenta chroma → multi-density sprite strips/GIFs Video, raw/clean frames, 8/16/24/48 sprite sets, strips, preview GIFs Grok Build only

Grok Build only: $video2dsprite

$video2dsprite is a Grok Build exclusive skill. It depends on Grok's native image_gen / image_edit + image_to_video tools (still → short clip). Codex and other agents do not have image_to_video, so they cannot run the generation half of this pipeline.

Use it when you want smoother intermediate poses (e.g. run/walk cycles) by sampling dense frames from a 6s in-place motion clip. Tradeoffs: softer pixels, possible identity drift, chroma fringe — for crisp production sheets, keep using $generate2dsprite.

Install for Grok Build by copying skills into ~/.grok/skills (see Install). On Codex, install is still ~/.codex/skills; $video2dsprite will load but must refuse the video step if tools are missing.

Case study: Ryo run (16 denser frames)

Pipeline: base still → image_to_video (6s) → chroma key → 16-frame strip.

Note: GitHub README does not reliably render <video> tags (especially inside tables). Motion is shown as GIF previews; MP4 files are still in the repo for download / local play.

Base still Motion (image_to_video) Sprite result (16f)
Ryo base still on magenta Ryo 6s run video preview
Download MP4
Ryo 16-frame run loop

Ryo 16-frame run strip
16-frame strip (feet-aligned, denser than a classic 6–8 pose sheet)

Short skill intro (MP4, open file): intro.mp4

Case assets on disk (~2–3 MB — safe for git)
src/video2dsprite-ryo/
  base.png              # identity still (docs size)
  run-6s.mp4            # image_to_video clip (compressed)
  run-6s-preview.gif    # same motion as GIF for README display
  strip-16.png          # denser sprite strip
  preview-16.gif        # sprite loop for README
  intro.mp4             # short skill explainer

We intentionally do not commit raw 145-frame dumps or full-resolution working folders.

$generate2dmap only uses $generate2dsprite when the selected map pipeline needs reusable transparent props. Small environmental props can be batched into 2x2, 3x3, or 4x4 prop packs, then extracted into individual transparent props. Simple maps can stay as a single baked image.

When a visual reference is involved, the image skills follow the same wrapper rule: make the image visible in the conversation first. Attached images and freshly generated images are already visible; local files should be opened with view_image before asking built-in image generation to preserve identity, style, map layout, or sprite lineage.

How It Works

  1. The user asks Codex for a sprite, prop pack, map, or engine-ready prototype.
  2. The agent chooses the asset type, action, bundle shape, sheet layout, frame count, style, and alignment strategy.
  3. Built-in image generation creates the raw visual asset.
  4. Local scripts run deterministic post-processing: chroma-key cleanup, despill, frame extraction, alignment, prop-pack slicing, GIF/PNG export, and validation metadata.
  5. For maps and prototypes, Codex can also assemble placement metadata, collision, trigger zones, Godot scenes, or Unity project wiring.

The script is not the creative brain. The agent makes the visual and pipeline decisions; the Python tools only perform repeatable pixel and export operations.

What It Can Generate

agent-sprite-forge (0x0funky/agent-sprite-forge)

Searching Database…

这是什么?Agent Sprite Forge 是一套 Codex 技能,把自然语言提示变成游戏可用的 2D 素材:动画 sprite sheet、透明 PNG 帧、GIF 和分层 RPG 地图,还能接入 Godot 或 Unity 场景。
这是独立应用,还是装进智能体里的东西?它不是应用。它是一套 Codex(或 Grok Build)智能体技能,加上确定性的本地 Python 脚本:智能体负责规划并调用图像生成,脚本负责清理、切分、对齐和导出结果。
必须用 Codex 吗,还是任何智能体都行?generate2dsprite 和 generate2dmap 需要一个内置图像生成的智能体,比如 Codex 或 Grok Build。更密集的 video2dsprite 管线则只有 Grok Build 能用,因为它依赖 Grok 原生的 imagetovideo 工具。
video2dsprite 在 Codex 里也能用吗?不能。该技能在 Codex 里能加载,但只能拒绝视频生成那一步,因为 Codex 和其他智能体缺少该管线所依赖的 Grok 的 imagetovideo 工具。
用它需要懂 Python 或游戏引擎吗?不需要,你只要用大白话描述想要的素材,Codex 会跑完整条管线并自动调用 Python 脚本。之后要真正用上导出的 Godot 或 Unity 场景,则需要对这些引擎有基本了解。
它支持哪些游戏引擎?Godot 和 Unity。它可以产出带 TileMapLayer、道具、碰撞和区域的可编辑 Godot 场景,或带内容数据库、把 sprite 接进游戏玩法的 Unity 场景,也可以只输出适用于任何引擎的普通透明 PNG/GIF 素材。
包含哪些技能?三个:generate2dsprite 用于 sprite sheet 和动画,generate2dmap 用于分层 RPG 地图和可在 Godot 里编辑的场景,video2dsprite 用于从短视频片段采样的更密集的动态 sprite(仅限 Grok Build)。
为什么不直接生成图片拿来就用?因为原始的 AI 生成图片并不能直接用于游戏。该技能的确定性 Python 脚本负责色键清理、帧提取、对齐、道具包切分和校验元数据,把一张生成的图变成可用的 sprite sheet 或引擎素材。
最终输出长什么样?sprite 类:原始 sheet、清理后的透明 sheet、单帧图片、GIF 和元数据。地图类:底图、加了装饰的参考图、道具包、抠出的透明道具、平面化预览图和场景元数据。
Creator
0x0funky
Size
86 MB
Stars
4.5K
Age
5mo
Commits · 90 Days