spritecook-generate-sprites

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SpriteCook - 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
npx spritecook-mcp setup
or see spritecook.ai.
当用户为游戏项目需要像素画、精细精灵图、游戏资源、图标、tileset、纹理或UI元素时,可使用SpriteCook MCP工具。SpriteCook能根据文本提示生成可用于生产环境的游戏美术资源。
要求: 编辑器需连接SpriteCook MCP服务器。使用
npx spritecook-mcp setup
进行设置,或查看spritecook.ai

When 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.
ParameterTypeDefaultDescription
prompt
string (required)-What to generate. Be specific: subject, pose, view angle
width
int64Width in pixels (16-512)
height
int64Height in pixels (16-512)
variations
int1Number of variations (1-4)
pixel
booltruePixel art (true) or detailed/HD art (false)
pixel_perfect
booltrueGrid-aligned pixel post-processing
bg_mode
string"transparent""transparent", "white", or "include"
theme
stringnullArt theme context, e.g. "dark fantasy medieval"
style
stringnullStyle direction, e.g. "16-bit SNES style"
aspect_ratio
string"1:1""1:1", "16:9", or "9:16"
smart_crop
booltrueAuto-crop to content bounds (see note below)
smart_crop_mode
string"tightest""tightest" (smallest fit) or "power_of_2" (32, 64, 128...)
mode
string"assets""assets", "texture", or "ui"
resolution
string"1K""1K", "2K", or "4K"
colors
string[]nullHex color palette, max 8 (e.g. ["#2D1B2E", "#FF6B35"])
reference_asset_id
stringnullAsset ID from a previous generation to use as style reference
edit_asset_id
stringnullAsset ID to edit/modify with the new prompt
reference_asset_id
and
edit_asset_id
are mutually exclusive. The referenced asset must belong to your account. Use
reference_asset_id
to maintain visual consistency across assets.
Note on output dimensions:
pixel_perfect
processing ensures clean pixel art, but the final sprite content may not fill the exact requested canvas size. When
smart_crop
is enabled, the output is trimmed to fit the content. In
"tightest"
mode (default), a 64x64 request might return a 54x54 image. In
"power_of_2"
mode, it snaps to the nearest power of 2 (32, 64, 128...), so 64x64 stays 64x64.
根据文本提示生成游戏美术资源。最多等待90秒获取结果,返回下载URL。
参数类型默认值描述
prompt
字符串(必填)-要生成的内容。请描述具体:主体、姿势、视角
width
整数64像素宽度(16-512)
height
整数64像素高度(16-512)
variations
整数1生成变体数量(1-4)
pixel
布尔值true是否为像素画(true)或精细/高清美术(false)
pixel_perfect
布尔值true是否启用对齐网格的像素后期处理
bg_mode
字符串"transparent"可选值:"transparent"(透明)、"white"(白色)或"include"(包含背景)
theme
字符串null美术主题背景,例如"黑暗奇幻中世纪"
style
字符串null风格方向,例如"16位SNES风格"
aspect_ratio
字符串"1:1"可选值:"1:1"、"16:9"或"9:16"
smart_crop
布尔值true自动裁剪至内容边界(见下方说明)
smart_crop_mode
字符串"tightest"可选值:"tightest"(最贴合裁剪)或"power_of_2"(最近的2的幂次,如32、64、128...)
mode
字符串"assets"可选值:"assets"(资源)、"texture"(纹理)或"ui"(UI元素)
resolution
字符串"1K"可选值:"1K"、"2K"或"4K"
colors
字符串数组null十六进制调色板,最多8种颜色(示例:["#2D1B2E", "#FF6B35"])
reference_asset_id
字符串null之前生成的资源ID,用作风格参考
edit_asset_id
字符串null要通过新提示编辑/修改的资源ID
reference_asset_id
edit_asset_id
互斥。参考的资源必须属于你的账户。使用
reference_asset_id
可保持资源间的视觉一致性。
输出尺寸说明:
pixel_perfect
处理可确保像素画清晰,但最终精灵图内容可能不会完全填满请求的画布尺寸。启用
smart_crop
后,输出会裁剪至内容大小。在默认的"tightest"模式下,64x64的请求可能返回54x54的图片。在"power_of_2"模式下,会对齐到最近的2的幂次(32、64、128...),因此64x64的请求会保持64x64。

check_job_status

check_job_status

Check progress and get results of a generation job by
job_id
. Returns asset download URLs when complete.
通过
job_id
检查生成任务的进度并获取结果。任务完成后返回资源下载URL。

get_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
pixel_url
(direct download link). Use this URL to download and save the PNG file into your project.
PowerShell:
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
display_name
or
id
to create a meaningful filename. The URLs are temporary (expire after ~1 hour), so download promptly after generation.
响应中的每个生成资源都包含一个
pixel_url
(直接下载链接)。使用此URL下载并保存PNG文件到你的项目中。
PowerShell:
powershell
Invoke-WebRequest -Uri $pixel_url -OutFile "assets/sprite.png"
Bash / macOS:
bash
curl -sL -o "assets/sprite.png" "$pixel_url"
使用资源的
display_name
id
创建有意义的文件名。这些URL是临时的(约1小时后过期),请在生成后及时下载。

Autonomous Workflow

自主工作流

When a user is building a game, proactively identify and generate needed assets. Follow this pattern:
  1. Check credits with
    get_credit_balance
    before generating. Note the
    concurrent_jobs
    field - 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.
  2. Identify required assets from the game description (characters, items, tiles, UI, icons)
  3. Generate a hero asset first (e.g. the main character) to establish the art style
  4. Use
    reference_asset_id
    with the hero asset's ID for subsequent generations to maintain visual consistency
  5. Download the assets from the
    pixel_url
    in each result and save the PNG files into the project's asset directory
  6. 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
reference_asset_id
for fish, rod, boat, etc. -> all assets share the same art style -> download and place in project.
Use
edit_asset_id
when the user wants to iterate on a specific asset (e.g. "make the sword larger" or "change the color of the helmet").
If you receive a 429 error (concurrent job limit), wait for the active job to complete before submitting the next one.
当用户开发游戏时,主动识别并生成所需资源。遵循以下流程:
  1. 生成前检查credits:使用
    get_credit_balance
    。注意
    concurrent_jobs
    字段,这是你可同时运行的任务数。除非你的限制允许并行生成,否则请按顺序生成资源(一次一个)。
  2. 识别所需资源:从游戏描述中确定需要的资源(角色、物品、tiles、UI、图标)
  3. 先生成核心资源(例如主角),以此确定美术风格
  4. 后续生成使用
    reference_asset_id
    :使用核心资源的ID,保持视觉一致性
  5. 下载资源:从每个结果的
    pixel_url
    下载并保存PNG文件到项目的资源目录
  6. 在游戏代码中引用保存的文件
示例:用户说“做一个钓鱼游戏” -> 检查credits -> 先生成玩家角色 -> 使用该资源ID作为
reference_asset_id
生成鱼、鱼竿、船等 -> 所有资源保持相同美术风格 -> 下载并放入项目。
当用户想要迭代特定资源时(例如“把剑改大一点”或“改变头盔颜色”),使用
edit_asset_id
如果收到429错误(超出并发任务限制),请等待当前任务完成后再提交下一个任务。

Asset Type Tips

资源类型建议

Asset TypeRecommended Settings
Characterswidth: 64-128, bg_mode: "transparent", pixel: true
Items/Iconswidth: 32-64, bg_mode: "transparent", pixel: true
Tilesetswidth: 128-256, mode: "texture", bg_mode: "include"
UI Elementswidth: 64-256, mode: "ui", bg_mode: "transparent"
Backgroundswidth: 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
    reference_asset_id
    to keep consistent art style across all assets in a project
  • Use
    theme
    and
    colors
    for additional style and palette consistency
  • Set
    variations: 2-3
    when you want options to pick from
  • Use
    edit_asset_id
    to refine or modify existing assets
资源类型推荐设置
角色width: 64-128, bg_mode: "transparent", pixel: true
物品/图标width: 32-64, bg_mode: "transparent", pixel: true
Tilesetwidth: 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
    优化或修改现有资源