Skip to main content

hiapi-game-assets:从游戏创意制作配套素材包

把游戏设定写进统一计划,通过 HiAPI 生成配套的角色、地块、界面图形、背景和音频。流程还包含素材切片,以及把素材接入小型可玩原型。

来源信息

仓库
HiAPIAI/hiapi-game-asset-studio-skill
最近来源活动
2026年10月6日 03:23
检测到的 SKILL.md 语言
英语
星标
0
分支
0

相关案例

HiAPI 的 Tidekeeper 示例 以守灯塔的猫为设定。作者报告生成了 14 项素材,包括角色姿势、地块、图标、视差背景、音乐、旁白与预告片,总计 $2.34;这是该案例的自报费用,不是新素材包的报价。

必要前提

先确定类型与视角、主角、世界设定、敌人与道具,以及美术风格。生成脚本需要 Node,切片使用 Python 依赖;付费生成需要 HiAPI Key。

操作说明

将游戏需求写入 plan.json,先生成主视觉,后续素材通过引用它保持设计关联。源码要求先看估算:

node scripts/run-plan.mjs plan.json --out=assets --dry-run

确认费用后再运行计划,逐项检查素材、切割素材表,并打开原型试玩后交付文件。

限制

生成会产生费用,源码要求首次调用前确认估算,额外付费重试也要说明。素材使用需遵守 HiAPI 及模型服务方条款。流程交付文件和原型,游戏发布由用户负责。

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
hiapi-game-assets
description
Make a complete, consistent game asset pack from one game idea through one HiAPI key — key art, character sprites and poses with transparent backgrounds, enemies, items, tilesets and UI icon sheets cut into game-ready PNGs, parallax backgrounds, title logo, background music, narrator voice lines and a trailer — then wire them into a playable prototype. Use for game jams, indie prototypes, pitch decks, modding, "make assets for my game", sprites, tilesets, game music or a game trailer.
# HiAPI Game Asset Studio One game idea → one `plan.json` → every asset, all in one art style, made through HiAPI: | asset | HiAPI model | notes | |---|---|---| | key art, sprites, tiles, icons, backgrounds, logo | `gpt-image-2.5-sunburst` (text-to-image / image-to-image) | `ref` keeps characters on model; `background: transparent` for sprites | | background cut-out | `851-labs/background-remover` | for images that came back with a background | | music | `minimax-music-2.6` | `instrumental: true` for loops | | voice lines | `qwen-audio-3.0-tts-plus` | `instruction` sets the delivery | | trailer | `seedance-2.0-fast` | animates a generated image (`from`) | `HIAPI_API_KEY` comes from the environment (or `.env` here). Never print or write it. ## Hard gates - **Cost first.** Always run `--dry-run` and tell the user the estimate before the first paid run. A typical pack is $1–3; the trailer is the largest item (seconds × price). Never loop paid calls to "try again" without saying so. - **Original work only.** No existing game characters, logos, or a living artist's name in prompts. "In the style of a modern indie platformer" is fine; "Nintendo's Mario" is not. - **No publishing.** Hand over files; the user ships. ## Workflow ### 1. The game in five lines Agree with the user: genre and camera (side-scroller, top-down, isometric…), the hero, the world, the enemies/items, and the art style in one sentence (pixel art 16-bit, hand-painted, low-poly…). Write it as `game` and `style` in the plan. ### 2. Write `plan.json` (see `references/plan.md`) - **Anchor first:** the first image is the key art (16:9). Every character, enemy and background then uses `"ref": ["key_art"]`, and every extra pose of a character uses `"ref": ["<that character>"]`. This is what keeps the pack consistent — skip it and every sprite comes out a different design. - Sprites: `"background": "transparent"`, 1:1, "full body, centred, side view facing right". - Sheets (tiles, icons, items): one image, "evenly spaced on a plain dark background", then slice it (step 4). - Backgrounds: separate far and near layers for parallax; keep the bottom quarter empty for gameplay. - Text only where it belongs (the title logo): quote the exact words. ### 3. Run it ```bash node scripts/run-plan.mjs plan.json --out=assets --dry-run # free: order, models, estimated cost node scripts/run-plan.mjs plan.json --out=assets # makes everything; resumable node scripts/run-plan.mjs plan.json --out=assets --redo=hero # remake one asset (and keep the rest) ``` Assets in `assets/manifest.json` are skipped on the next run, so editing one prompt and re-running costs one asset. Look at every image before moving on; redo what is off-model, has stray text, or a wrong background. ### 4. Make them game-ready ```bash uv run --with pillow --with numpy --with scipy python scripts/slice.py assets/tiles.png assets/tiles/ uv run --with pillow --with numpy --with scipy python scripts/slice.py assets/title.png assets/title_cut/ --min=200 node scripts/gallery.mjs assets --title="My game" # review page: every image, sound and the trailer ``` `slice.py` removes the plain background (only where it touches the border, so dark pixels inside a tile stay) and writes one transparent PNG per piece plus `index.json`. Check the slices: a piece split in two means the gap was too wide (re-slice with a larger `--min`, or regenerate the sheet with more spacing). ### 5. Prove it plays Wire the pack into a small playable prototype (one HTML file with a canvas is enough: parallax layers, the hero with its poses, a few enemies and pickups, HUD icons, the title, the music). `examples/tidekeeper/play.html` is a complete ~120-line example; `record.mjs` there renders it headless into a gameplay clip. Open it and play it before handing over. ### 6. Hand over The asset folder (with `gallery.html`), the prototype, the real cost from `manifest.json`, and anything that needed a redo. Generated output links expire after about 7 days; the files are already downloaded.
在 GitHub 查看