S
spritesynthDOCS

NPC & Enemy Design

Generate character variants for NPCs and enemies — faction color schemes, size variations, and equipment loadouts.

Overview

A game world needs more than one character template repeated endlessly. NPCs need visual variety — different clothing, colors, and proportions — while enemies need to be clearly readable as threats. The goal is maximum visual variety from minimal generation effort by reusing base templates and varying specific attributes.

Step 1: Create a Base NPC Template

Generate a neutral villager as your template:

curl -X POST https://api.spritesynth.com/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art villager, simple tunic, friendly face, medieval fantasy",
    "direction_count": 4,
    "width": 32,
    "height": 32
  }'

Save this as a template for generating variants.

Step 2: Generate Enemy Variants by Faction

Create distinct visual identities for each enemy faction:

# Goblin faction — green skin, ragged cloth
curl -X POST https://api.spritesynth.com/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art goblin warrior, green skin, leather armor, rusty sword, hostile",
    "direction_count": 4,
    "width": 32,
    "height": 32
  }'

# Skeleton faction — bone white, dark armor
curl -X POST https://api.spritesynth.com/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art skeleton warrior, bone white, black armor, glowing red eyes",
    "direction_count": 4,
    "width": 32,
    "height": 32
  }'

Step 3: Create Size Variants

Generate larger versions for bosses and mini-bosses by increasing the canvas size:

curl -X POST https://api.spritesynth.com/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art giant goblin chieftain, oversized weapon, tribal armor, boss enemy",
    "direction_count": 4,
    "width": 64,
    "height": 64
  }'

Tips

  • Faction palette rules — Assign a signature color per faction (red for goblins, blue for knights, purple for cultists) and include it in every prompt.
  • Silhouette readability — Ensure enemies are distinguishable from NPCs at a glance. Different body shapes are more effective than different colors.
  • Equipment tells — Give stronger enemies visibly better equipment (glowing weapons, fuller armor) so players can assess threat level visually.

Need help?

Join our Discord community for support and tips.

Was this page helpful?

On this page