Game Character Sprite Generator
This skill generates game character sprites using Google Veo's video generation capabilities.
Quick Start
bash
# Full workflow: generate video, extract frames, build sprite sheet node ./src/cli.js --prompt "A goblin monster walking" --duration 3 --fps 12 --resolution 512x512 --output ./output # Extract frames from existing video only node ./src/cli.js --frames-only --duration 3 --fps 12 --resolution 512x512 --output ./output
Common Commands
| Task | Command |
|---|---|
| Generate sprite from prompt | node ./src/cli.js --prompt "..." --output ./output |
| Select 6 key frames | node src/selectFrames.js ./output |
| Remove black background | node src/trim.js --input ./output/sprite_6.png |
Output Files
- •
character.mp4- Generated video from Veo - •
frames/- Individual frame PNGs - •
sprite.png- Full sprite sheet grid - •
sprite.json- Metadata (dimensions, frame count, fps) - •
sprite_6.png/sprite_6.json- 6-frame selection
Key Parameters
- •
--prompt: Text description of the character (be specific about pose/movement) - •
--duration: Video length in seconds (3-5 works well) - •
--fps: Frames per second (8-16 for sprite sheets) - •
--resolution: Video resolution (512x512 recommended) - •
--output: Output directory path
Tips for Good Results
- •Prompting: Include "looping" or "seamless loop" for seamless animations
- •Character: Specify "pixel art" or "2D animation style" if needed
- •Background: Use dark backgrounds for easier removal
- •Trim: Run
trim.jsafter to remove black backgrounds
Project Structure
code
src/ ├── cli.js # Main entry point ├── veoClient.js # Google Veo API wrapper ├── ffmpegHelper.js # Frame extraction ├── spriteBuilder.js # Sprite sheet assembly ├── selectFrames.js # 6-frame selector ├── trim.js # Background removal └── imageUtils.js # Image utilities