# AI use cases for Pixelfx (patch-gg/pixelfx)

Repo: [patch-gg/pixelfx](https://github.com/patch-gg/pixelfx) | Use cases: 3 | Page: https://dedupedai.com/use-cases/patch-gg-pixelfx/

pixelfx is a library of 244 pixel art effects and animations, each a small piece of code with no images: fire, explosions, magic, weather, UI, pickups and more. You can play them live, recolor and mirror them, drop them into a browser game, or export sprite sheets for any engine. It includes a Claude Code skill that makes new effects by drafting, rendering, looking and refining.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Drop a pixel art spell effect into your browser game: https://dedupedai.com/use-cases/patch-gg-pixelfx/drop-pixel-effects-into-a-browser-game/
- Export effects as sprite sheets for Godot, Unity or any engine: https://dedupedai.com/use-cases/patch-gg-pixelfx/export-effects-as-sprite-sheets-for-godot-or-unity/
- Have Claude Code make and refine a new pixel effect: https://dedupedai.com/use-cases/patch-gg-pixelfx/make-new-effects-with-the-claude-code-skill/

## How to drop a pixel art spell effect into your browser game with Pixelfx

Repo: [patch-gg/pixelfx](https://github.com/patch-gg/pixelfx) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install the package and draw an effect behind and in front of your characters each frame.

**Who it is for:** A developer making a canvas or Phaser game who needs effects with no art pipeline.

**The problem:** Hand-drawing frames for every spell and hit takes an artist days.

**The outcome:** Code-driven effects composited into your game at its own pixel resolution, with no dependencies.

### Steps

1. Run `npm i github:patch-gg/pixelfx`, or copy src/core and the effects you want
2. Import createFrame, createFx and composite plus an effect such as `pixelfx/fx/ice/frost-nova`
3. Each tick call fx.update(dt), draw it with "back" behind characters and "front" in front
4. Composite into ImageData and scale up with image-rendering: pixelated

### Prompt to paste into your agent

```text
Add the pixelfx frost-nova effect to my canvas game at the mage's position, drawn behind and in front of characters as in the README example. Use `npm i github:patch-gg/pixelfx`.
```

### Caveat

This card is written from the patch-gg/pixelfx README, not from a test run by Deduped. Before you start, make sure you have Node.js. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/patch-gg-pixelfx/drop-pixel-effects-into-a-browser-game/

## How to export effects as sprite sheets for Godot, Unity or any engine with Pixelfx

Repo: [patch-gg/pixelfx](https://github.com/patch-gg/pixelfx) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Render one effect or the whole library to sprite sheets with timing metadata.

**Who it is for:** A Godot, Unity or GameMaker developer who needs effect sprite sheets.

**The problem:** Engine projects need sheets with fps, loop and pivot data, not JavaScript.

**The outcome:** Sprite sheets with meta.pixelfx data that Phaser's atlas loader and the Aseprite importers read.

### Steps

1. Run `node tools/render.mjs ice/frost-nova --sheet` for one effect
2. Run `node tools/sheets.mjs` to export the whole library to sheets/
3. Recolor with a palette, for example `node tools/render.mjs fire/torch --gif --opts '{"palette": ["#102","#215","#43a","#8cf","#cff","#fff"]}'`
4. Import the sheet with your engine's Aseprite importer

### Prompt to paste into your agent

```text
Clone patch-gg/pixelfx and export the fire and explosion effects as sprite sheets with `node tools/render.mjs <id> --sheet`, then tell me the fps, loop and pivot from each meta.pixelfx block.
```

### Caveat

This card is written from the patch-gg/pixelfx README, not from a test run by Deduped. Before you start, make sure you have Node.js. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/patch-gg-pixelfx/export-effects-as-sprite-sheets-for-godot-or-unity/

## How to have Claude Code make and refine a new pixel effect with Pixelfx

Repo: [patch-gg/pixelfx](https://github.com/patch-gg/pixelfx) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install the Pixelfx skill and ask for an effect; or start one yourself and iterate on the contact sheet.

**Who it is for:** A game developer who wants new effects that look hand-tuned.

**The problem:** Effects an AI writes blind often look floaty or broken in motion.

**The outcome:** A new effect drafted, rendered, checked and refined until it reads well.

### Steps

1. Run `/plugin marketplace add patch-gg/pixelfx` and `/plugin install pixelfx@pixelfx` in Claude Code
2. Ask, for example, "Make five takes on a coin pickup sparkle and show me the best two."
3. Or run `node tools/new.mjs arcane/my-spell` and `node tools/render.mjs arcane/my-spell` and look at the contact sheet
4. Run `node tools/check.mjs arcane/my-spell` for spills, seams, unseeded randomness and slow frames

### Prompt to paste into your agent

```text
With the pixelfx skill installed, make a punchy ice shard hit effect: draft it, render the contact sheet, fix the worst problem, and repeat until `node tools/check.mjs` passes.
```

### Caveat

This card is written from the patch-gg/pixelfx README, not from a test run by Deduped. Before you start, make sure you have Node.js. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/patch-gg-pixelfx/make-new-effects-with-the-claude-code-skill/
