S
spritesynthDOCS

Building Game Worlds

Combine tilesets, objects, and characters to create cohesive game environments.

Overview

A game world is more than a map — it's terrain, props, NPCs, and lighting working together. spritesynth's generation models are specialized per asset type: Pixel Party XL for tilesets and environments, Flux for characters and objects.

This guide shows how to layer top-down tiles for terrain, place objects for interactive props, and populate the scene with characters — all with consistent visual styling.

Step 1: Generate the Terrain Tileset

Start with the foundation — ground tiles, walls, and terrain features:

curl -X POST https://api.spritesynth.com/v1/generations/tileset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "grass, dirt path, stone walls, water tiles for a fantasy forest",
    "type": "top_down",
    "tile_size": 16
  }'

Step 2: Generate Environment Objects

Add interactive and decorative props to populate the world:

curl -X POST https://api.spritesynth.com/v1/objects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "pixel art treasure chest, wooden texture, iron bands",
    "direction_count": 1,
    "project_id": "your-project-uuid"
  }'

Generate trees, rocks, fences, torches, and other props using consistent prompts.

Step 3: Add Characters and NPCs

Populate the world with characters that match the environment's style:

curl -X POST https://api.spritesynth.com/v1/characters \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art forest NPC, green tunic, brown boots, friendly expression",
    "direction_count": 4,
    "width": 32,
    "height": 32
  }'

Tips

  • Match tile size to character size — A 16px tile grid pairs naturally with 32px tall characters (2:1 ratio).
  • Consistent palette across layers — Use the same color palette for tiles, objects, and characters.
  • Test in-engine early — Export a small section and import it into your game engine to verify scale and alignment.

Need help?

Join our Discord community for support and tips.

Was this page helpful?

On this page