{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "gary149-h3-game-sprites--pack-character-moves-into-atlas",
 "repo": "gary149/h3-game-sprites",
 "repo_url": "https://github.com/gary149/h3-game-sprites",
 "repo_slug": "gary149-h3-game-sprites",
 "title": "Pack a character's moves into one engine-ready atlas",
 "page_title": "How to pack a character's moves into one engine-ready atlas with H3 Game Sprites",
 "summary": "Combine idle, walk and attack frames into one atlas at a single global scale with shared anchors.",
 "who": "A developer building a 2D fighter or action game who has several cut move folders and needs one atlas with consistent scale so characters stand on the floor.",
 "problem": "Per-frame scaling and mismatched anchors make a character jump in size or sink through the ground when drawn in the engine.",
 "outcome": "An atlas.json describing all moves with one global scale and shared ankle-based anchors, ready for drawImage in the engine.",
 "steps": [
  "Cut each move clip into its own folder under sprites/ with scripts/sprite_cut.py, for example sprites/idle, sprites/walk and sprites/punch.",
  "Run `python3 scripts/build_atlas.py sprites/ atlas.json --moves idle,walk,punch --ref idle`.",
  "Open atlas.json and confirm the moves listed match the folders you cut.",
  "Render a test frame in your engine and measure the on-screen height and floor contact, as the README advises, rather than trusting metadata alone."
 ],
 "agent_prompt": "Using the h3-game-sprites repo, build an atlas from the cut move folders in <sprites directory> using scripts/build_atlas.py with --ref idle, writing atlas.json. Report the moves included and the global scale, and confirm that one rendered test frame stands on the floor.",
 "agents": [
  "claude-code"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The README explains the drawImage offset math but does not give engine-specific code, so the floor check has to be done in your own engine.",
 "category": "Games and hobbies",
 "tags": [
  "Games and hobbies"
 ],
 "lang": "python",
 "requirements": [
  "ffmpeg installed locally",
  "Python 3 with Pillow and numpy",
  "A video model such as H3 / Hailuo 3 via OpenRouter, fal or MiniMax, or an ordinary video file you already have",
  "An image model or illustrator for the character still (gen_still.py defaults to Nano Banana through OpenRouter and reads OPENROUTER_API_KEY)",
  "Budget of roughly $0.60-0.70 per five-second clip plus a few cents per still, varying by provider"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/gary149-h3-game-sprites/pack-character-moves-into-atlas/",
 "md": "https://dedupedai.com/use-cases/gary149-h3-game-sprites/pack-character-moves-into-atlas/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/gary149-h3-game-sprites--pack-character-moves-into-atlas.json",
 "api_version": "v1"
}
