From One Character Drawing to a Game-Ready Sprite Sheet With sprite-gen, a Free AI Tool That Checks Its Own Animation
AI image tools got good at drawing a character years ago. They are still bad at drawing the same character twice. Ask for your knight standing, then your knight swinging a sword, and you often get two knights who might be cousins. For a single illustration that hardly matters. For a game, where one character needs dozens of frames that line up perfectly, it is the whole problem.
Then there is the part nobody posts about. Even when the frames look right, a game engine does not want a folder of pretty pictures. It wants one image with every frame packed into a grid, a transparent background, and a small data file that says where each frame sits and how fast to play it. Building that by hand is hours of cutting, aligning and exporting.
A free, open-source project called sprite-gen goes after both problems at once. Its README sums it up in six words: "One drawing in. Game-ready sprites out." It has picked up about 3,800 stars on GitHub and has been on the daily trending lists this week.
My take: the generation is the flashy part, but the reason to use sprite-gen is its checking step. It makes you watch every animation as an animation before anything ships. Given that its own author calls the walk and run cycles experimental, that checking step is the feature.
What it actually makes
Give sprite-gen one finished drawing of your character, and it hands back:
- A sprite sheet called
sprite-sheet-alpha.png: every frame of every animation packed into one transparent image. - A map of that sheet called
manifest.json: a small text file that tells your game where each frame sits, how fast each animation plays, and which ones loop. - Preview files for checking: a looping GIF and a contact sheet (all the frames side by side) for each animation, plus a notes file for your verdict on each one.
- Export files for game tools: for the Aseprite sprite editor and for engines such as Phaser and Flame.
The animations are up to you. You list the states you want (idle, attack, hurt, whatever your game needs), along with frame counts, frame rate and cell size, in a settings file. There is also an optional "breathing" pass that adds a little squash and stretch to idle poses so a standing character does not look frozen.
How it keeps your character looking like your character
The approach is simple and sensible. Your one drawing is the reference for everything. The README says the tool "locks the character's identity" from that base image, and every pose request points back to it.
That puts a lot of weight on the drawing you start with. The project's own guide asks for "one accepted, uncropped, full-body idle image with the intended proportions, style, orientation and identity." In plain terms: draw the character standing, whole body in frame, facing the way they will face in the game, in the exact style you want. If you want pixel art, the guide warns that the drawing needs a real, measurable pixel grid, because "changing prompt wording later cannot correct its style." You cannot ask your way out of a soft, painterly base and into crisp pixels.
The images themselves come from AI services you already use. sprite-gen does not ship its own drawing model. It calls OpenAI's Codex through your ChatGPT login, xAI's Grok through your Grok login, or OpenAI's image service with a paid key. The guide's advice for choosing: "grok for speed, codex for tighter prompt adherence." It then cuts each frame out of its colored background, cleans the edges, and packs the sheet.
The checking step is the point
Here is the line from the README I would put on a sticky note: the tool makes "per-state GIFs and contact sheets, so motion is judged as motion before anything ships."
Anyone who has animated knows why. A single frame can look perfect and still pop, slide or jitter when it plays. A walk cycle with one foot planted a few pixels off looks like the character is skating. You only catch that by watching the loop, over and over, at game speed.
sprite-gen builds that habit into the process. Each animation gets its own preview GIF and contact sheet, and a qa-notes.md file holds your verdict on each one. The optional curation view lets you compare, reject, nudge and preview loops before they are baked into the sheet.
It also has a second route for smoother motion. Instead of drawing frames one by one, video-set asks Grok's video model to animate your still, then cuts the video into frames and finds the loop point. It runs its own checks here too: it fails a loop that does not repeat cleanly, flags a visible jump at the seam, and rejects frames where the character touches the top, left or right edge of the cell. Walk and run loops in this route use a frame-blending tool called RIFE, which creates in-between frames for smoother playback.
Put this into practice
You need a computer with Python 3.11 or newer, and comfort with typing a few commands. If you have installed anything from GitHub before, you can do this.
1. Prepare the drawing. Draw or pick your character: full body, standing idle, facing the direction they will move, on a plain flat background, at the style and proportions you want in the game. For pixel art, make sure the pixel grid is clean. Save it as base.png.
2. Install. Download the project from GitHub, then in its folder run:
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
sprite-gen --help
The README is firm that this separate Python setup (the first line) "is the only supported" way to run it.
3. Set up the run. Tell sprite-gen about your character:
sprite-gen prepare --out-dir run1 --character-id hero --base-image base.png
Put your choices (cell size, which animations, how many frames, frame rate) in the sprite-request.json settings file the project uses.
4. Generate, cut out, pack.
sprite-gen gen-set --run-dir run1 --provider codex
sprite-gen extract --run-dir run1
sprite-gen compose-atlas --run-dir run1
The first line draws the animation rows, several at a time. The second removes the backgrounds. The third builds the sprite sheet and its map file.
5. Watch every loop. Open each preview GIF and watch it at least ten times. Look at the feet, the hands and the outline. Write your verdict for each animation in qa-notes.md. Then open sprite-gen curation --run-dir run1 to reject, nudge and recheck the frames that fail.
6. Try it in the engine. Load sprite-sheet-alpha.png and the export file into your game engine and play the animations at real size and speed, against your real backgrounds. That is the only test that counts.
7. For smoother loops, try the video route. Install ffmpeg and img2webp, sign in to Grok, then:
sprite-gen video-set --base side=still.png --states idle,walk,run,jump,attack --out-dir set/
A summary table in the output folder lists every result.
Honest limitations
Walking and running are the weak spot. The README says it plainly: "Cyclic locomotion (walk/run) stays experimental unless motion QA actually passes." Those are the animations a player watches most. Budget the most time for them, and be ready to clean them up by hand.
It is not free to run, only free to download. The tool costs nothing, but the drawing happens on paid AI services. With your ChatGPT or Grok subscription login, it uses your plan first. With the OpenAI route or any API key, each call is billed, and the OpenAI route prints the charge "before the request leaves." The README gives no per-sprite price, so run a small test character first and check your usage.
The direction detector can be wrong. In video-set, the check for which way your character faces only records its guess by default, and it "can be wrong even at high confidence." Check left and right versions yourself.
Your starting drawing decides everything. A cropped, off-style or soft drawing produces a sheet full of the same problems. The tool copies your choices faithfully, including the bad ones.
You need the command line. There is no app with buttons. If you have never typed a terminal command, pair up with someone who has for the first run.
Check the rights on your inputs. The tool's code is Apache 2.0, which allows commercial use. The images come from whichever AI service you pick, under that service's terms, and from your drawing, which should be yours.
The drawing is still the job
There is a fear among illustrators that tools like this make the artist optional. sprite-gen suggests the opposite. It does the cutting, packing and exporting that nobody got into art to do. It even builds the frames. But it needs a strong, deliberate character drawing to start from, and it needs a human who can watch a walk cycle and say "her left foot slides."
So start small. Pick one character you have already drawn, ask for an idle and one attack, and run the whole loop from drawing to engine. Watch the GIFs like an animator. If the idle breathes and the attack lands, add a walk cycle and see how much fixing it needs. You will know within an afternoon whether sprite-gen saves you a week or costs you one.