S
spritesynthDOCS

VFX & Particle Effects

Generate sparkles, explosions, fire, magic effects, and multi-frame VFX sprite strips.

Overview

Visual effects bring a game to life — a fireball that flickers, a hit spark that scatters, a heal glow that pulses. spritesynth can generate multi-frame VFX sprites that you sequence in the editor to create smooth, looping particle-like effects. Unlike traditional particle systems, these are pre-rendered sprite strips that perform well on all devices.

Step 1: Generate Effect Sprites

Start with individual effect frames using the image generation endpoint:

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 fire explosion center, orange red yellow, white hot core, transparent background",
    "width": 32,
    "height": 32
  }'

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 sparkle effect, star shaped, cyan white, transparent background",
    "width": 16,
    "height": 16
  }'

Generate 3-8 frames per effect for smooth animation. Vary the prompt slightly per frame (add scale, rotation, or intensity cues) to create a natural progression.

Step 2: Sequence Frames in the Editor

  1. Open the editor and create a new project for VFX.
  2. Import each generated frame as a separate layer.
  3. Arrange frames in the timeline in sequence order.
  4. Set per-frame duration (50-80ms for fast effects, 100-150ms for slow effects).
  5. Enable onion skinning to check frame-to-frame continuity.

Step 3: Common Effect Types

EffectFramesDurationTechnique
Sparkle3-460ms per frameSmall bright center, expand, fade out
Explosion5-850ms per frameFlash, expand ring, debris scatter, smoke
Fire4-680ms per frameBase flame, flicker up, side wisps
Magic glow3-5120ms per frameSoft pulse, expand, contract back
Hit spark2-340ms per frameStarburst lines, quick fade

Step 4: Export for Game Integration

Export the sequenced effect as a sprite sheet:

# Export from the editor as a horizontal sprite strip
curl -o effect-spritesheet.png https://api.spritesynth.com/v1/assets/{asset_id}/download \
  -H "Authorization: Bearer YOUR_API_KEY"

In your game engine, slice the sprite sheet into individual frames and play them as a one-shot animation. For continuous effects (fire, magic glow), loop the sequence.

Tips

  • Transparent background — Always use transparent background in prompts. VFX are composited over game layers.
  • Smaller is better — 16×32 or 32×32 is enough for most effects. Large effects can be scaled up in-engine.
  • One-shot vs loop — Explosions and hit effects play once. Fire, glows, and ambient effects loop. Configure this in the timeline.
  • Color-coded by element — Use consistent color schemes: fire (red/orange/yellow), ice (cyan/blue/white), poison (green/purple), holy (gold/white).

Need help?

Join our Discord community for support and tips.

Was this page helpful?

On this page