Effects on your own sprites.

Auras, hits, shields and explosions as frames a game can play. PixelLab's free workbench builds one around your character or object; the pixelfx and pixel-vfx-codex libraries render them on your own machine, to place by a pivot.

The vfx command
A blue aura around the robotLightning striking the robotA shield bubble around the robot

Free effects on your sprites.

pixelkiln vfx drives PixelLab's VFX workbench. Start from one of its presets or layer its parts, build the effect around a character, and get a spritesheet, a GIF, an atlas, and a game pack with every piece as its own clip. The workbench renders a recipe instead of generating, so it costs nothing on a subscription, and the recipe it saves renders the same pixels again.

A shimmering bubble shield around the robot
shield_bubble preset
A crackling blue aura rising around the robot
aura preset, electric ramp
A lightning bolt striking the robot, with a shockwave ring
lightning_strike preset, one-shot
Stars circling over the robot's head
stun_stars part
terminal
pixelkiln vfx --preset lightning_strike --sprite robot.png --out fx/zap# writes fx/zap.png  .gif  .json  .vfx.jsonpixelkiln vfx --recipe fx/zap.vfx.json --out fx/zap-again
  • 41 presets and about 90 parts: explosions, slashes, auras, shields, status icons, weather.
  • Every effect is saved to your PixelLab account, where its sliders can be moved; --effect pulls the edit back down.
  • A .vfx.json record keeps the full recipe; re-rendering one gave a byte-identical sheet.

Objects work the same way.

The workbench fits an effect to whatever image it is given. It does not ask whether that image is a character. These three were rendered around props with the same presets, for nothing.

A wooden chest inside a shimmering blue bubble shield
shield_bubble a 68px chest, by object:<id>
A small kiln with a pulsing purple glow behind it
rim_glow a 32px kiln, from a local PNG
A lightning bolt striking a small anvil, with a shockwave ring on the ground
lightning_strike a 32px anvil, one-shot
terminal
# a local PNG of the proppixelkiln vfx --preset rim_glow --sprite props/kiln.png --out fx/kiln-glow# an object already in your PixelLab accountpixelkiln vfx --preset shield_bubble --sprite object:<id> --out fx/chest-shieldpixelkiln vfx --preset lightning_strike --sprite props/anvil.png --out fx/anvil-strike
  • A local PNG and an object:<id> reference both worked. The reference needs no download first.
  • Each preset places the prop itself: the bubble centred the chest, the strike and the glow stood the others on the ground line.
  • A preset's canvas does not shrink to the sprite. The strike is 96×128 whatever stands under it, so a 32px prop looks small beneath it.
  • Lighting presets such as firelight change only the sprite's own pixels. On a 32px prop the change was too slight to show here.
pixelkiln.manifest.json
{"styles": {"props": { "generator": "map", "outDir": "art/props" },"fx": { "generator": "vfx", "outDir": "art/fx" }},"assets": {"chest": { "prompt": "a wooden treasure chest", "file": "chest.png", "styles": ["props"] },"chest.shield": {"vfx": { "preset": "shield_bubble", "sprite": "art/props/chest.png" }}}}
  • In a manifest, sprite can be another asset's output. The effect waits until that file exists, then renders in a later wave of the same gen.
  • Regenerate the prop and the effect goes stale with it, because the sprite's content is part of the effect's identity.
  • The frames include the prop. Add --game-pack on the command line when the game draws the prop itself and needs the layers apart.

The same chest, with effects from pixelfx.

A pixelfx effect is never built around a sprite, so the game does the placing. Each loop below is the chest and one effect, drawn in the order named, with the effect's pivot on one point of the chest.

pickups/coin-spin in front, pivot just above the lid
pickups/collect-burst in front, plays once, pivot on the lid
holy/sunburst behind, pivot on the chest's centre
place-effect.ts
import { loadPixelfx, renderPixelfx } from "pixelkiln"const lib = await loadPixelfx()const coin = renderPixelfx(lib, { effect: "pickups/coin-spin", fps: 12 })// the chest is drawn at (32, 60); the coin belongs just above its lidconst target = { x: 64, y: 62 }const at = { x: target.x - coin.anchor.x, y: target.y - coin.anchor.y }// every tick: draw the chest, then coin.frames[i] at `at`// (draw the effect first to put it behind, as with holy/sunburst)
  • The coin's pivot is (28, 48) on its 56×56 frame, so a target of (64, 62) puts the frame at (36, 14).
  • Draw order is yours: the coin and the burst go over the chest, the sunburst under it.
  • pixelfx frames are sized for a small character. On a 64px prop they fit as they are; nothing was scaled here.
  • From the command line the same effect is pixelkiln vfx --lib pixelfx --effect pickups/coin-spin --out fx/coin; the pivot is in fx/coin.json.

Around a sprite, or on its own.

An effect reaches your game one of two ways. Which one you pick decides whether it knows about the character or object under it.

Built around a sprite

Give PixelLab's workbench a --sprite and the effect is drawn to fit it: an aura follows its outline, a shield wraps it, lightning lands on it. The sprite can be a character or an object, as a local PNG, a URL, or a PixelLab reference such as character:<id>:south or object:<id>.

  • The sheet and GIF show the sprite with the effect behind and in front of it, as in the four above.
  • --game-pack also writes each layer as its own clip, with a manifest of its depth and offset, so your game can draw its own animated sprite between them.
  • The paid artist (--description) takes a walk or attack strip and builds the effect around every frame.

On its own, placed by a pivot

Leave the sprite out, or render from the pixelfx library, and you get the effect alone on transparency. Its atlas names one point, the pivot, in meta.anchor. Your game puts that point where the effect belongs.

  • It works over a character, an object, a tile, or the UI alike, because it knows nothing about what is under it.
  • Typical pivots: a character's feet for a spawn puff, a hand or muzzle for a shot, the point of contact for a hit, a wall tile for a torch.
  • pixelfx effects that need a body to wrap (burning, frozen, whole attack moves) are not rendered yet; use the workbench with --sprite for those.

Or render them on your own machine.

--lib pixelfx draws from pixelfx, an MIT-licensed library of code-drawn effects by Patch. No key, no network, no cost. Its randomness is seeded, so the same recipe writes the same bytes every time.

fire/torch loops, pivot on the wall bracket
lightning/spark-arc loops, pivot on the ground
spawn/poof plays once, pivot at the feet
pickups/coin-spin loops, pivot under the coin
terminal
npm i github:patch-gg/pixelfxpixelkiln vfx effectspixelkiln vfx --lib pixelfx --effect fire/torch --fps 12 --out fx/torch# writes fx/torch.png  .json  .vfx.jsonpixelkiln vfx --recipe fx/torch.vfx.json --out fx/torch-again
  • 171 standalone effects in 18 categories: fire, explosions, water, ice, lightning, impacts, projectiles, pickups, weather, critters.
  • --palette swaps an effect's color ramp for yours; --seed rolls it differently.
  • pixelfx is not on the npm registry, so you install it yourself. Without it the command stops and prints the install line.

A second library, seen from three cameras.

--lib codex draws from pixel-vfx-codex, an MIT-licensed library of 138 effects by 888wing and contributors. Each is defined once in 3D and rendered through a camera you choose, so the same fireball can fly side-on or across an isometric floor.

A fireball flying right, then bursting into smoke
fireball 2d camera, 12 fps
The same fireball flying down an isometric floor and bursting
fireball 25d camera, 20 fps, isometric
A green rune circle on the ground with sparkles rising from it
healing-field 25d camera, a ground effect
A black hole with a glowing disk, seen from an orbiting camera
black-hole 3d camera, 30 fps, orbiting
terminal
npm i github:888wing/pixel-vfx-codexpixelkiln vfx effects --lib codexpixelkiln vfx --lib codex --effect fireball --out fx/fireballpixelkiln vfx --lib codex --effect fireball --camera 25d --param tailLength=1.6 --hue 40 --out fx/fireball-iso
  • 138 effects in 16 categories: projectiles, beams, ground areas, bursts, vortices, shields, summons, domains.
  • --param sets an effect's own settings, such as a fireball's tail length, within the range it lists. --hue recolors it.
  • The library is new and unversioned (it stays at 1.0.0 while its code changes), so each record keeps a hash of its engine and the command says when it differs.
  • Frames are cropped to the effect and its pivot, so sizes vary. Like pixelfx, it is not on the npm registry.

Playing one in your game.

Both sources write the same pair: a spritesheet and an Aseprite-style atlas. Most engines import that pair directly. Four things are all a game needs to know.

fx/torch.json
{"frames": [{ "filename": "torch 0", "frame": { "x": 0, "y": 0, "w": 72, "h": 120 }, "duration": 83 },{ "filename": "torch 1", "frame": { "x": 72, "y": 0, "w": 72, "h": 120 }, "duration": 83 }],"meta": {"image": "torch.png","anchor": { "kind": "origin", "x": 36, "y": 94 },"pixelfx": { "id": "fire/torch", "fps": 12, "loop": true, "frames": 24, "columns": 7 }}}
  1. Where each frame is. frames[i].frame is its rectangle on the sheet, in play order, and duration is how long it shows, in milliseconds.
  2. Where to draw it. Draw the frame's top-left corner at target − meta.anchor. For the torch above, a bracket at (200, 150) puts the frame at (164, 56).
  3. When to stop. A looping effect repeats until you remove it. A one-shot plays its frames once; free it after the last. pixelfx sheets say which in meta.pixelfx.loop, and every .vfx.json record has a loop field.
  4. How to blend it. Frames are ordinary RGBA with straight alpha. Glow is already baked into the alpha, so normal blending is right; draw the effect after the thing it sits on.

Every control, side by side.

One command, three sources. --out <base>, --force, --dry-run and --json mean the same for both.

To do thisPixelLab workbench (default)--lib pixelfx--lib codex
List what existsvfx presets, vfx partsvfx effects (add --json for every option and default)vfx effects --lib codex (--json adds each parameter's range)
Pick the effect--preset <name>, plus --part <name> as often as you like--effect <category>/<name>--effect <id>, plus --camera 2d, 25d or 3d
Build it around a sprite--sprite <file | URL | character:<id>:<dir>>Not available: effects stand alone and are placed by their pivotNot available: effects stand alone and are placed by their pivot
ColorsSliders on pixellab.ai, pulled back with --effect <id> --force--palette "#102,#43a,#8cf,#fff", a ramp from dark to bright--hue <degrees> turns every color; there is no palette option
VariationPart sliders in the saved effect--seed <n>--param name=value and --tune name=value; no seed, because effects are pure functions of time
Speed--fps <n>, 1 to 60--fps <n>, 1 to 60; sets the frame count too--fps <n>; each camera steps at its own rate (12, 20 or 30)
CanvasSet by the preset and the spriteThe effect's own size; --margin <px> adds transparent space around itCropped to the effect and its pivot; --margin <px> adds space
Render it again--recipe <base>.vfx.json--recipe <base>.vfx.json, no --lib needed--recipe <base>.vfx.json, no --lib needed
Extra files<base>.gif, and --game-pack for one clip per layerNone: no GIF is writtenNone: no GIF is written
NeedsPIXELLAB_API_KEY and a subscription; free to rendernpm i github:patch-gg/pixelfx; no key, no networknpm i github:888wing/pixel-vfx-codex; no key, no network

A record that renders it again.

Every run writes <base>.vfx.json beside the sheet. It says what made the effect and holds the recipe. Commit it, and anyone can rebuild the sheet with --recipe.

fx/boom.vfx.json
{"provider": "pixelfx","library": { "name": "pixelfx", "version": "0.3.1", "license": "MIT" },"effect": "explosions/small-explosion","width": 300, "height": 240, "frames": 66, "fps": 12, "loop": false,"anchor": { "kind": "origin", "x": 150, "y": 196 },"sheetSha256": "…","recipe": {"effect": "explosions/small-explosion","fps": 12,"options": { "palette": ["#102", "#215", "#43a", "#8cf", "#fff"], "seed": 3 }}}
  • A pixelfx record names the library version. If yours differs, the run says so, because a newer version may draw the effect differently.
  • Edit recipe.options by hand to reach what the flags do not cover: flip, angle, light, and each effect's own options.
  • A PixelLab record holds the effect's full layer recipe, its saved id, and the sprite it was built around.
  • Flags given with --recipe override the recorded value, one option at a time.

The same calls from code.

The command is a thin layer over functions the pixelkiln package exports. Use them to render effects in a build script, or to get raw frames without writing files.

render-effects.ts
import { loadPixelfx, listPixelfxEffects, makePixelfxVfx, renderPixelfx } from "pixelkiln"const lib = await loadPixelfx()const ids = listPixelfxEffects(lib).filter((fx) => !fx.needsCharacter).map((fx) => fx.id)const made = await makePixelfxVfx(lib, {effect: "fire/torch",fps: 12,options: { seed: 4 },out: "fx/torch",})console.log(made.paths.sheet, made.anchor, made.frames)const { frames, width, height } = renderPixelfx(lib, { effect: "pickups/coin-spin" })
  • loadPixelfx() finds the library in your project and throws an error with code capability when it is missing.
  • makePixelfxVfx() writes the sheet, atlas and record, and returns their paths, the pivot and the sheet's SHA-256.
  • renderPixelfx() returns one RGBA buffer per frame and writes nothing.
  • makeVfx() and makeVfxWithArtist() are the PixelLab equivalents.

More of PixelKiln.

Teach your agent PixelKiln.

The skill tells compatible agents when to plan, when to ask for a budget, when to restore existing work, when to stop for human review, and how to verify output.

Agent setupLibrary quickstart