GuidepixelfxIntermediateAbout 15 min6 steps
Export game-ready pixel effects and sprite sheets from pixelfx, then recolor them
This guide is for creators and developers who want game-ready pixel art effects. You export a sprite sheet, recolor an effect, and learn how to draft new effects with a coding agent.
Before you start
- Install Node.js, since the tools run with node.
- Keep a local copy of the pixelfx repository (the Chinese edition is bayshier/pixelfx-zh, translated from patch-gg/pixelfx) and open a terminal at its root.
- Optional: Claude Code or Codex, if you want an agent to draft new effects.
Open the live gallery to see all 244 effects, including fire, explosions, weather, UI, pickups and critters, and pick the ones you want. Each effect is a file in src/fx/<category>/<name>.js, and docs/CATALOG.md lists them all.
From the repo root, run the render tool with the effect path in the form category/name. It writes a transparent PNG of every frame in a grid, plus an Aseprite-style JSON with frame rects, durations, and meta.pixelfx (fps, loop, columns and the pivot). Phaser's atlas loader and the Aseprite importers for Godot and Unity can read it.
Run in the terminal node tools/render.mjs ice/frost-nova --sheetAny effect accepts a palette, which is a ramp of hex colors running from dark to bright. Run this example to render the torch as a GIF with a blue-purple flame.
Run in the terminal node tools/render.mjs fire/torch --gif --opts '{"palette": ["#102","#215","#43a","#8cf","#cff","#fff"]}'To get sprite sheets for every effect, run the sheets tool. The output goes to the sheets/ folder.
Run in the terminal node tools/sheets.mjsFor canvas, Phaser, PixiJS, Kaplay or three.js games, you can use the effect code itself, with no dependencies. Install it from GitHub, or copy src/core and the effects you want into your project.
Run in the terminal npm i github:patch-gg/pixelfxThe project's method is to describe the effect loosely with your art direction and let the agent write 5-10 first drafts, rendered as short videos in a /records directory. Pick one, refine its details, and repeat until it matches your vision. Give the agent some of the existing effects as references.
Paste into Claude Code or Codex Using the effects in this pixelfx repo as references, write 5-10 first drafts of a new pixel art effect: <describe your effect and art direction>. Render each as a short video in a /records directory so I can inspect them.
Watch out for
- Don't expect a one-shot result. The author says good pixel art effects need iteration, picky review of motion and timing, and good references.
- Run the node tools from the repository root so the tools/ paths resolve.
Questions
- Which engines can use the sprite sheets?
- Any engine. The README names Godot, Unity, GameMaker, Defold, LÖVE and Bevy. Phaser's atlas loader and the Aseprite importers for Godot and Unity read the JSON.
- Can I use the effects commercially?
- The Chinese edition's description states an MIT license with commercial use allowed.
- Do I need paid services to make new effects?
- No. According to the author, beyond a frontier coding agent like Claude Code or Codex, you don't need extra tools or paid services.
Sources
Based on
- bayshier/pixelfx-zh (1 Nov)