# pixelfx — card for AI agents

244 pixel art effects and animations written as code, playable in browser games or exportable as sprite sheets.

Category: 2D game art and sprites · maker Patch (Hugo Duprez) · checked 2026-11-04

## Price
- Price: Free
- Free tier: Free and open source under the MIT license

## License
MIT License — https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE

- commercial: **yes** (Commercial use OK)
  > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE)
- attribution: **no** (No credit needed)
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  (https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE)
- in app: **yes** (Can ship inside your app)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
  (https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE)

## Rules to follow
- Keep the MIT license file and copyright notice with the code and assets you ship.
- Install with npm i github:patch-gg/pixelfx or copy src/core and the effects you need.
- Export sprite sheets with node tools/render.mjs <id> --sheet for non-browser engines.
- Some effects adapt Hugo Duprez's code; keep the notices at the top of those files.

## How to connect
- Download only
- Repository: https://github.com/patch-gg/pixelfx
- Website: https://patch-gg.github.io/pixelfx/

## Notes
Added automatically. License read from the official pages.

## Numbers (AgentGid data)
- Gid Score: 32
- GitHub stars: 9,317

## Lines to paste into your prompt or AGENTS.md

```
- pixelfx (2D game art and sprites). 244 pixel art effects and animations written as code, playable in browser games or exportable as sprite sheets. Price: free; commercial use OK; no credit needed.
  Connect: download from https://patch-gg.github.io/pixelfx/ (no API).
  Rule: Keep the MIT license file and copyright notice with the code and assets you ship.
  Rule: Install with npm i github:patch-gg/pixelfx or copy src/core and the effects you need.
  Rule: Export sprite sheets with node tools/render.mjs <id> --sheet for non-browser engines.
  Rule: Some effects adapt Hugo Duprez's code; keep the notices at the top of those files.
  License: https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE (checked 2026-11-04; details: https://agentgid.com/assets/pixelfx/)
```

## Links
- AgentGid page: https://agentgid.com/assets/pixelfx/
- Is it free for commercial use? https://agentgid.com/assets/pixelfx/commercial-use/
- Source: https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE
- Source: https://github.com/patch-gg/pixelfx


## pixelfx: pixel art effects drawn by code for games

pixelfx is a free library of 244 pixel art effects, such as fire, explosions, magic, weather and coin pickups. Each one is a small piece of code instead of an image. You can play them live in a browser game, change their colors, or export them as sprite sheets for engines like Godot or Unity.

### Where to use it
- Spell and hit effects in a browser game: Add a frost nova, a sword slash or an explosion to a canvas, Phaser, PixiJS or three.js game without drawing frames by hand.
- Sprite sheets for Godot, Unity or GameMaker: Turn any effect into a transparent PNG sheet with frame data that engine importers read, for games not written in JavaScript.
- One effect in many colors: Make a blue fire, a pink heal or team-colored sparks from the same effect by passing your own color ramp.
- Full attacks with a character: Play a whole move, with a wind-up, a short freeze on the hit and a target that rocks back, to make fights feel heavier.
- Game UI moments: Use the confetti, achievement, countdown and coin-collect effects for wins, rewards and level starts.
- Pixel effects on a retro website: Put a looping campfire, fireflies or falling leaves on a pixel-style landing page or game trailer page. (idea, not from the official pages)

### How to start
- There is no package on the npm registry; install it straight from GitHub, or copy the core folder and the effects you need.

```
npm i github:patch-gg/pixelfx
```

- Pick an effect in the catalog or the gallery; every effect is one file with an id like ice/frost-nova.
- Create it with createFx, then update and draw it in your game loop; for other engines, render a sprite sheet with the render tool.

```
node tools/render.mjs ice/frost-nova --sheet
```


### License
MIT license for the code and the effects: free in any game or app, paid ones included. Keep the copyright notices; the pixel font in the gallery folder is not covered.

### Good to know
- The effects contain no images; each one is drawn by code, frame by frame, from a seed, so frame 40 always looks the same.
- Sprite sheet export runs the project's own tools with Node, so you need a copy of the project on your computer.
- Some files adapt code from other MIT projects; keep the notices at the top of those files when you copy them.
- The README also advertises Patch, a site for publishing browser games, through a global command-line install. That is optional and not needed to use the effects.
- Effects drawn on a character paint the stock grey dummy; with your own hero, redraw those or skip them.

Checked 2026-11-12 against: https://github.com/patch-gg/pixelfx, https://github.com/patch-gg/pixelfx/blob/HEAD/README.md, https://github.com/patch-gg/pixelfx/blob/HEAD/LICENSE, https://github.com/patch-gg/pixelfx/blob/HEAD/NOTICE.md, https://github.com/patch-gg/pixelfx/blob/HEAD/docs/CATALOG.md, https://github.com/patch-gg/pixelfx/blob/HEAD/package.json, https://patch-gg.github.io/pixelfx/

### Mistakes to avoid
- Don't: npm install pixelfx → Do: npm i github:patch-gg/pixelfx (pin a commit), or copy src/core and the effect files (There is no pixelfx package on the npm registry (registry.npmjs.org/pixelfx answered Not found on 2026-11-12); the README installs from GitHub.)
- Don't: Copying one effect file without the core folder and its category _lib.js → Do: Copy src/core and the whole category helpers the effect imports, or install the package (Effects import their helpers from ../../core/index.js and ./_lib.js; our demo needed 27 files for six effects.)
- Don't: Drawing the frame onto a scaled canvas with smoothing on → Do: Keep the game's pixel resolution and scale the canvas with CSS image-rendering pixelated (The effects are drawn at pixel size, so smoothing blurs them.)
- Don't: Calling fx.draw(frame) once and skipping composite() → Do: Draw "back", then your characters, then "front", then composite() into ImageData and put it on the canvas (The frame holds color and light in two buffers; composite adds the glow on top.)

### Questions
- Can I use the effects in a paid game? Yes. Code and effects are MIT licensed and may be used in anything, commercial included.
- My game is in Godot or Unity. Can I still use them? Yes. Export each effect as a transparent PNG sprite sheet with an Aseprite-style JSON that their importers read.
- Can I change the colors? Yes. Pass a palette, a dark-to-bright list of colors, and the effect uses it without code changes.
- Does it need other libraries? No. In a browser game you use the code directly with no other libraries.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
