aldegad/sprite-gen
Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
What it solves
sprite-gen addresses the inconsistency and technical unusable of AI-generated sprite sheets. Standard image models often produce characters with shifting identities, overlapping poses, and backgrounds that are difficult to remove, making them unsuitable for direct use in game engines. This tool provides a structured pipeline to turn a single base image into a professional, game-ready sprite atlas with consistent character identity and precise frame layouts.
How it works
The project uses a multi-stage pipeline to generate and refine sprites:
- Generation: It drives image generation row-by-row using a base image and layout guides to maintain identity across different actions (e.g., idle, jump, attack).
- Extraction: A chroma-alpha engine removes backgrounds (magenta/green keys) using soft-alpha unmixing to preserve fine details like hair strands and outlines.
- Backbone Lattice: To fix "wobbly" AI pixel art, it calculates a consistent grid (the backbone) across all frames in a sequence, ensuring blocks stay the same size and don't drift.
- Breathe Engine: It can turn a single still pose into a living loop by applying deterministic squash-and-stretch animations based on the character's anatomy (e.g., neck, torso, appendages).
- Curation: A web-based viewer allows users to reorder frames, perform non-destructive transforms (scale, rotate, shear), and select the best takes from multiple generation runs.
- Baking: The final result is baked into a transparent PNG atlas and a
manifest.jsonfile that tells the game engine exactly where each frame is located.
Who it’s for
Game developers and pixel artists who want to use AI to accelerate the creation of animated character sprites and isometric assets without sacrificing technical precision or character consistency.
Highlights
- Anatomy-aware "Breathe" animation: Automatically generates breathing loops from a single frame without needing more art.
- Backbone Lattice: Ensures pixel-perfect consistency across animation frames by snapping cuts to a shared grid.
- Curation Webview: A standalone tool for human-in-the-loop refinement of AI-generated frames.
- Deterministic Recoloring: Create multiple color variants of a sprite sheet with exact RGB matching.
- Runtime Manifest: Ships a machine-readable layout file so engines don't have to guess grid positions.
Related
- Project
- Project
- Project
- Project
- Project