Wan Game Assets
Generate game assets using wan2.7-image API for indie game developers and game studios.
Quick Start
# Generate character sprites
python scripts/cli.py --style pixel character --name "勇士" --count 4
# Generate scene variants
python scripts/cli.py --style pixel scene --name "森林村庄" --variants day night
# Generate items batch
python scripts/cli.py --style pixel items --category weapons --count 8
# Generate monster evolution
python scripts/cli.py --style pixel monster --name "史莱姆" --evolution 3
# Generate UI elements
python scripts/cli.py --style cartoon ui --type buttons --count 6
# One-click prototype pack
python scripts/cli.py --style pixel --output ./prototype/ prototype --game-type rpg
Core Capabilities
- Character Sprites: Generate sprite sequences with poses/expressions
- Scene Variants: Generate environments with time/weather variations
- Item Icons: Batch generate game items and equipment icons
- Monster Series: Generate enemies with evolution forms
- UI Elements: Generate buttons, menus, dialogs, icons
- Tutorial Images: Generate step-by-step game guides
- Concept Art: Generate design variations for exploration
- Prototype Pack: One-click complete asset generation
Workflow
User Request -> Select Generator -> Build Prompt -> Generate -> Download -> Save
Commands
character
Generate character sprite sequences.
python scripts/cli.py character --name <name> [--poses <list>] [--count <n>] [--style <style>] [--reference <path>] [--output <dir>]
Parameters:
--name: Character name (required)--poses: Pose list (default: idle, walk, attack, defend)--count: Number of sprites (default: 4)--equipment: Equipment/accessories description--reference: Reference image path for style consistency
scene
Generate scene variants.
python scripts/cli.py scene --name <name> [--variants <list>] [--elements <list>] [--style <style>] [--output <dir>]
Parameters:
--name: Scene name (required)--variants: Variants to generate (day, night, rain, snow, etc.)--elements: Key scene elements
items
Generate item icons batch.
python scripts/cli.py items --category <category> [--count <n>] [--description <text>] [--style <style>] [--output <dir>]
Parameters:
--category: Item category (weapons, armor, consumables, materials)--count: Number of items (default: 8)--description: Additional description
monster
Generate monster evolution series.
python scripts/cli.py monster --name <name> [--evolution <n>] [--elements <list>] [--style <style>] [--output <dir>]
Parameters:
--name: Monster name (required)--evolution: Number of evolution forms (default: 3)--elements: Monster abilities/elements
ui
Generate UI elements.
python scripts/cli.py ui --type <type> [--count <n>] [--style <style>] [--output <dir>]
Types: buttons, menus, dialogs, icons
tutorial
Generate tutorial step images.
python scripts/cli.py tutorial --topic <topic> [--steps <n>] [--style <style>] [--output <dir>]
concept
Generate concept art variations.
python scripts/cli.py concept --concept <description> [--count <n>] [--style <style>] [--output <dir>]
prototype
Generate complete prototype asset pack.
python scripts/cli.py prototype --game-type <type> [--style <style>] [--output <dir>]
Game Types: rpg, card, platformer, strategy, casual, default
Style Presets
| Style | Description | Recommended | |-------|-------------|-------------| | pixel | 16-bit retro pixel art | Indie games, platformers | | cartoon | Bold outlines, flat colors | Casual games, kids games | | anime | Manga style, cel-shaded | JRPGs, visual novels | | realistic | High detail, cinematic | AAA games, simulations | | fantasy | Magical, mystical | Fantasy RPGs |
Output Structure
./assets/
├── characters/
│ └── hero/
│ ├── hero_idle.png
│ ├── hero_walk.png
│ └── ...
├── scenes/
│ └── village/
│ ├── village_day.png
│ ├── village_night.png
├── items/
│ └── weapons/
│ ├── weapons_1.png
│ └── ...
├── monsters/
│ └── slime/
│ ├── slime_lv1.png
│ ├── slime_lv2.png
├── ui/
│ └── buttons/
│ └── btn_1.png
Environment Setup
Set DASHSCOPE_API_KEY environment variable before using.
export DASHSCOPE_API_KEY="your-api-key"
Detailed References
For detailed guides and best practices, see:
- game-assets-guide.md - Asset generation best practices
Script Structure
scripts/
├── cli.py # Unified CLI entry point
├── batch.py # Prototype pack generator
├── core/
│ ├── base_generator.py # Base wan2.7 API wrapper
│ ├── asset_downloader.py # Image download and save
│ └── prompt_builder.py # Prompt construction
├── generators/
│ ├── character.py # Character sprite generator
│ ├── scene.py # Scene variant generator
│ ├── items.py # Item icon generator
│ ├── monsters.py # Monster series generator
│ ├── ui.py # UI element generator
│ ├── tutorial.py # Tutorial image generator
│ └── concept.py # Concept art generator
Templates
templates/
├── styles/ # Style presets
│ ├── pixel.json
│ ├── cartoon.json
│ ├── anime.json
│ ├── realistic.json
│ └── fantasy.json
├── prompts/ # Prompt templates
│ ├── character_base.json
│ ├── scene_base.json
│ ├── items_base.json
│ └── monsters_base.json
├── game_types/ # Game type templates
│ ├── rpg.json
│ ├── card.json
│ ├── platformer.json
│ ├── strategy.json
│ ├── casual.json
│ └── default.json
扫码联系在线客服