spritecook-generate-sprites
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSpriteCook - AI Game Asset Generator
SpriteCook - AI游戏资源生成器
Use SpriteCook MCP tools when the user needs pixel art, detailed sprites, game assets, icons, tilesets, textures, or UI elements for a game project. SpriteCook generates production-ready game art from text prompts.
Requires: SpriteCook MCP server connected to your editor. Set up with or see spritecook.ai.
npx spritecook-mcp setup当用户为游戏项目需要像素画、精细精灵图、游戏资源、图标、tileset、纹理或UI元素时,可使用SpriteCook MCP工具。SpriteCook能根据文本提示生成可用于生产环境的游戏美术资源。
要求: 编辑器需连接SpriteCook MCP服务器。使用进行设置,或查看spritecook.ai。
npx spritecook-mcp setupWhen to Use
使用场景
- User asks to generate, create, or make sprites, pixel art, game assets, or icons
- User is building a game and needs visual assets (characters, items, environments, UI)
- User references sprites, pixel art, or game art in their request
- A game project needs consistent visual assets across multiple types
- 用户要求生成精灵图、像素画、游戏资源或图标
- 用户正在开发游戏,需要视觉资源(角色、物品、场景、UI)
- 用户的需求中提到了精灵图、像素画或游戏美术
- 游戏项目需要多种类型的视觉资源保持风格一致
Available Tools
可用工具
generate_pixel_art
generate_pixel_art
Generate game art assets from a text prompt. Waits up to 90s for result, returns download URLs.
| Parameter | Type | Default | Description |
|---|---|---|---|
| string (required) | - | What to generate. Be specific: subject, pose, view angle |
| int | 64 | Width in pixels (16-512) |
| int | 64 | Height in pixels (16-512) |
| int | 1 | Number of variations (1-4) |
| bool | true | Pixel art (true) or detailed/HD art (false) |
| bool | true | Grid-aligned pixel post-processing |
| string | "transparent" | "transparent", "white", or "include" |
| string | null | Art theme context, e.g. "dark fantasy medieval" |
| string | null | Style direction, e.g. "16-bit SNES style" |
| string | "1:1" | "1:1", "16:9", or "9:16" |
| bool | true | Auto-crop to content bounds (see note below) |
| string | "tightest" | "tightest" (smallest fit) or "power_of_2" (32, 64, 128...) |
| string | "assets" | "assets", "texture", or "ui" |
| string | "1K" | "1K", "2K", or "4K" |
| string[] | null | Hex color palette, max 8 (e.g. ["#2D1B2E", "#FF6B35"]) |
| string | null | Asset ID from a previous generation to use as style reference |
| string | null | Asset ID to edit/modify with the new prompt |
reference_asset_idedit_asset_idreference_asset_idNote on output dimensions: processing ensures clean pixel art, but the final sprite content may not fill the exact requested canvas size. When is enabled, the output is trimmed to fit the content. In mode (default), a 64x64 request might return a 54x54 image. In mode, it snaps to the nearest power of 2 (32, 64, 128...), so 64x64 stays 64x64.
pixel_perfectsmart_crop"tightest""power_of_2"根据文本提示生成游戏美术资源。最多等待90秒获取结果,返回下载URL。
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串(必填) | - | 要生成的内容。请描述具体:主体、姿势、视角 |
| 整数 | 64 | 像素宽度(16-512) |
| 整数 | 64 | 像素高度(16-512) |
| 整数 | 1 | 生成变体数量(1-4) |
| 布尔值 | true | 是否为像素画(true)或精细/高清美术(false) |
| 布尔值 | true | 是否启用对齐网格的像素后期处理 |
| 字符串 | "transparent" | 可选值:"transparent"(透明)、"white"(白色)或"include"(包含背景) |
| 字符串 | null | 美术主题背景,例如"黑暗奇幻中世纪" |
| 字符串 | null | 风格方向,例如"16位SNES风格" |
| 字符串 | "1:1" | 可选值:"1:1"、"16:9"或"9:16" |
| 布尔值 | true | 自动裁剪至内容边界(见下方说明) |
| 字符串 | "tightest" | 可选值:"tightest"(最贴合裁剪)或"power_of_2"(最近的2的幂次,如32、64、128...) |
| 字符串 | "assets" | 可选值:"assets"(资源)、"texture"(纹理)或"ui"(UI元素) |
| 字符串 | "1K" | 可选值:"1K"、"2K"或"4K" |
| 字符串数组 | null | 十六进制调色板,最多8种颜色(示例:["#2D1B2E", "#FF6B35"]) |
| 字符串 | null | 之前生成的资源ID,用作风格参考 |
| 字符串 | null | 要通过新提示编辑/修改的资源ID |
reference_asset_idedit_asset_idreference_asset_id输出尺寸说明: 处理可确保像素画清晰,但最终精灵图内容可能不会完全填满请求的画布尺寸。启用后,输出会裁剪至内容大小。在默认的"tightest"模式下,64x64的请求可能返回54x54的图片。在"power_of_2"模式下,会对齐到最近的2的幂次(32、64、128...),因此64x64的请求会保持64x64。
pixel_perfectsmart_cropcheck_job_status
check_job_status
Check progress and get results of a generation job by . Returns asset download URLs when complete.
job_id通过检查生成任务的进度并获取结果。任务完成后返回资源下载URL。
job_idget_credit_balance
get_credit_balance
Check remaining credits, subscription tier, and concurrent job limit on the connected account. Use this before batch generating to know how many credits you have and how many jobs you can run at once.
检查关联账户的剩余credits、订阅层级和并发任务限制。批量生成前使用此工具,了解可用credits数量和可同时运行的任务数。
Downloading Assets
下载资源
Each generated asset in the response includes a (direct download link). Use this URL to download and save the PNG file into your project.
pixel_urlPowerShell:
powershell
Invoke-WebRequest -Uri $pixel_url -OutFile "assets/sprite.png"Bash / macOS:
bash
curl -sL -o "assets/sprite.png" "$pixel_url"Use the asset's or to create a meaningful filename. The URLs are temporary (expire after ~1 hour), so download promptly after generation.
display_nameid响应中的每个生成资源都包含一个(直接下载链接)。使用此URL下载并保存PNG文件到你的项目中。
pixel_urlPowerShell:
powershell
Invoke-WebRequest -Uri $pixel_url -OutFile "assets/sprite.png"Bash / macOS:
bash
curl -sL -o "assets/sprite.png" "$pixel_url"使用资源的或创建有意义的文件名。这些URL是临时的(约1小时后过期),请在生成后及时下载。
display_nameidAutonomous Workflow
自主工作流
When a user is building a game, proactively identify and generate needed assets. Follow this pattern:
- Check credits with before generating. Note the
get_credit_balancefield - this is how many jobs you can run at the same time. Generate assets sequentially (one at a time) unless your limit allows parallel generation.concurrent_jobs - Identify required assets from the game description (characters, items, tiles, UI, icons)
- Generate a hero asset first (e.g. the main character) to establish the art style
- Use with the hero asset's ID for subsequent generations to maintain visual consistency
reference_asset_id - Download the assets from the in each result and save the PNG files into the project's asset directory
pixel_url - Reference the saved files in the game code
Example: User says "make a fishing game" -> check credits -> generate the player character first -> use that asset ID as for fish, rod, boat, etc. -> all assets share the same art style -> download and place in project.
reference_asset_idUse when the user wants to iterate on a specific asset (e.g. "make the sword larger" or "change the color of the helmet").
edit_asset_idIf you receive a 429 error (concurrent job limit), wait for the active job to complete before submitting the next one.
当用户开发游戏时,主动识别并生成所需资源。遵循以下流程:
- 生成前检查credits:使用。注意
get_credit_balance字段,这是你可同时运行的任务数。除非你的限制允许并行生成,否则请按顺序生成资源(一次一个)。concurrent_jobs - 识别所需资源:从游戏描述中确定需要的资源(角色、物品、tiles、UI、图标)
- 先生成核心资源(例如主角),以此确定美术风格
- 后续生成使用:使用核心资源的ID,保持视觉一致性
reference_asset_id - 下载资源:从每个结果的下载并保存PNG文件到项目的资源目录
pixel_url - 在游戏代码中引用保存的文件
示例:用户说“做一个钓鱼游戏” -> 检查credits -> 先生成玩家角色 -> 使用该资源ID作为生成鱼、鱼竿、船等 -> 所有资源保持相同美术风格 -> 下载并放入项目。
reference_asset_id当用户想要迭代特定资源时(例如“把剑改大一点”或“改变头盔颜色”),使用。
edit_asset_id如果收到429错误(超出并发任务限制),请等待当前任务完成后再提交下一个任务。
Asset Type Tips
资源类型建议
| Asset Type | Recommended Settings |
|---|---|
| Characters | width: 64-128, bg_mode: "transparent", pixel: true |
| Items/Icons | width: 32-64, bg_mode: "transparent", pixel: true |
| Tilesets | width: 128-256, mode: "texture", bg_mode: "include" |
| UI Elements | width: 64-256, mode: "ui", bg_mode: "transparent" |
| Backgrounds | width: 256-512, aspect_ratio: "16:9", bg_mode: "include" |
- Be specific in prompts: "a red dragon breathing fire, side view, single sprite" beats "dragon"
- Use to keep consistent art style across all assets in a project
reference_asset_id - Use and
themefor additional style and palette consistencycolors - Set when you want options to pick from
variations: 2-3 - Use to refine or modify existing assets
edit_asset_id
| 资源类型 | 推荐设置 |
|---|---|
| 角色 | width: 64-128, bg_mode: "transparent", pixel: true |
| 物品/图标 | width: 32-64, bg_mode: "transparent", pixel: true |
| Tileset | width: 128-256, mode: "texture", bg_mode: "include" |
| UI元素 | width: 64-256, mode: "ui", bg_mode: "transparent" |
| 背景 | width: 256-512, aspect_ratio: "16:9", bg_mode: "include" |
- 提示请具体:“一条喷火的红龙,侧视图,单个精灵图”比“龙”效果更好
- 使用保持项目中所有资源的美术风格一致
reference_asset_id - 使用和
theme进一步统一风格和调色板colors - 当需要选择时,设置
variations: 2-3 - 使用优化或修改现有资源
edit_asset_id