S
spritesynthDOCS

Sidescroller Level Design

Platformer tilesets — ground, platforms, backgrounds, parallax layers — with proper tile sizes and grid alignment.

Overview

Sidescroller tilesets need to support vertical stacking, platform gaps, and background depth. Unlike top-down tiles where all edges connect equally, platformer tiles have a clear up/down orientation: ground tiles need grass on top and dirt below, while platforms float in mid-air with edges on all sides.

Step 1: Generate Core Platform Tiles

Create the essential tile types for a platformer level:

curl -X POST https://api.spritesynth.com/v1/generations/tileset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "platformer tiles, grass ground with dirt below, stone platforms, cave walls",
    "type": "sidescroller",
    "tile_size": 16
  }'

Step 2: Generate Background and Parallax Layers

Create depth with separate background layers:

curl -X POST https://api.spritesynth.com/v1/generations/image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"prompt": "pixel art mountain range background, sunset sky, clouds, parallax layer",
    "width": 256,
    "height": 144
  }'

Generate three layers: far background (sky, mountains), mid-ground (hills, trees), foreground (decorative elements that pass in front of the player).

Step 3: Export and Set Up in Your Engine

Export the tileset and configure tile collision in your engine:

curl -X GET https://api.spritesynth.com/v1/tilesets/{tileset_id}/export \
  -H "Authorization: Bearer YOUR_API_KEY"

In your engine, mark ground tiles as solid from the top, wall tiles as solid from the sides, and background tiles as non-collidable.

Tips

  • Tile size consistency — 16×16 tiles scale cleanly to 32×32 sprites (2x) and 48×48 (3x). Avoid odd multipliers.
  • Parallax speed — Far layers move at 0.1x camera speed, mid at 0.3x, foreground at 0.6x for a convincing depth effect.
  • Platform edge markers — Add visual markers (arrows, cracks) to platform edges so players recognize traversal paths.

Need help?

Join our Discord community for support and tips.

Was this page helpful?

On this page