跪拜 Guibai
← All articles
Artificial Intelligence

A 5-Round Prompt Recipe Turns Any Photo Into a 57-Frame Desktop Pet Sprite Sheet

By AIOps打工人 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Sprite sheet generation has been a tedious manual art task. A repeatable prompt template that produces consistent, game-ready sprite sheets from a photo lowers the barrier for custom desktop companions, streamers, and small game prototypes — no artist needed.

Summary

A single reference photo and a carefully engineered prompt can produce a 57-frame horizontal sprite sheet with nine distinct actions — idle blink, coding, bug fixing, error display, loading, celebration, peeking, sleeping, and supervising. The entire pipeline runs on AI image generation alone; no drawing or coding is required. The prompt is structured into five modules: character definition to lock identity across frames, action design for a programmer's narrative arc, layout control to prevent frame overlap and cropping, art style parameters for clean chibi outlines, and a pure green background for one-click transparency. Five rounds of iteration with Doubao fixed character drift, stiff motion, gradient backgrounds, green artifacts on the character, and flat expressions. The resulting sprite sheet drops into a Codex desktop pet via a JSON config that maps frame ranges to named animations.

Takeaways
57 frames across 9 actions fit on one horizontal strip: idle, coding, bug fixing, error, loading, celebration, peeking, sleeping, and supervising.
The prompt uses five modules: character definition, action design, layout control, art style, and green-screen background.
Character consistency across frames depends on the clause "exactly the same person across all frames" and repeating key features like hairstyle and clothing.
Layout constraints — "minor variations," "no crop," and "enough spacing" — prevent frame overlap and cut-off limbs.
Pure green #00ff00 background with explicit prohibitions against shadows, gradients, and floor avoids AI adding unwanted lighting effects.
Five rounds of iteration fixed: face mismatch, stiff motion, non-solid background, green artifacts on the character, and dull expressions.
Codex desktop pet accepts a JSON config mapping frame index ranges to named animation loops.
Conclusions

Prompt engineering for sprite sheets is constraint engineering: telling the model what not to do (no gradients, no floor, no green on the character) matters more than describing the desired output.

The hardest AI habit to break was adding lighting and shadows to a background explicitly specified as solid green — a reminder that image models have strong priors that require negative prompting.

Frame counts are not arbitrary; 6 frames at typical animation speeds yields roughly a 1-second loop, which matches the rhythm of idle and coding actions.

Concepts & terms
Sprite sheet
A single image file containing multiple animation frames arranged in a grid or strip, used in 2D games and desktop pets to efficiently switch between frames for motion.
Chibi (Q-version)
A style of Japanese anime character drawing that exaggerates the head and eyes while shrinking the body, producing a cute, childlike appearance often used for mascots and desktop companions.
Cel shading
A flat coloring technique that uses solid blocks of color without gradients, mimicking traditional hand-drawn animation cels. In AI prompts, specifying 'flat cel-shading' prevents the model from adding realistic shadows and gradients.
Green screen keying
A technique borrowed from video production where a pure green (#00ff00) background is used so software can automatically remove it and replace it with transparency, avoiding manual background erasure.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗