提供基于代码生成的像素特效库及Claude Code工作流,为游戏开发提供可复用的视觉资产方案。
「pixelfx: pixel effects that learn to act」
pixelfx is not a sprite pack of finished explosions, but 244 pixel art effects where every one is a small piece of code: fire, water, ice, lightning, sci-fi, melee, impacts, projectiles, spawn and death, arcane, holy, shadow, status, nature, weather, UI, pickups, transitions and critters, plus 12 whole moves that chain them into attacks, all playable live in a gallery where they can be recolored and mirrored. It comes from Patch, and it follows Hugo Duprez's method at Sprite Fusion: code is clay, trust your eyes, feed your references, then look at the render and fix the worst thing.
Under the hood it is plain JavaScript with no dependencies and no bitmaps, just two buffers (one taking pixels, opaque, dithered or truly translucent, one taking additive glow), a palette any effect accepts as a dark-to-bright ramp of hex colors so a fire can burn blue and a heal can glow pink without touching its code, and seeded randomness so frame 40 is identical on every run. The front door is whatever the game already runs: canvas, Phaser, PixiJS, Kaplay and three.js take the code directly, while Godot, Unity, GameMaker, Defold, LÖVE and Bevy take exported sprite sheets, a transparent PNG grid with an Aseprite-style JSON of frame rects, durations, fps and pivot.
The mechanism splits two ways: pure effects export draw(p, t, o), the frame at t derived from t alone, so loops tile with no seam, while simulated effects step real particles, debris and lights at 120 Hz, so sparks bounce and smoke rolls the same at any frame rate. Then comes the move that turns a sticker into a performance: 61 effects with a character and all 12 moves declare their own act, a wind-up starting before the effect does, a snap and a freeze on contact, a target rocking back, a recovery, and the grey dummy carrying all of it is a 3D skeleton with fixed-length bones rendered in flat tones and one clean ink line, poses holding on 12 fps steps as particles run at full rate.
A Claude Code skill covers the rest of the loop: find, use and export an effect, or draft, render, look and refine a new one the way a picky pixel artist would, while the body stays open through skeleton(pose) for every joint of a pose and posedParts(pose) for each part drawn on its own.
Its edges are honest: effects drawn on the body paint the stock dummy rather than your own character, a sprite sheet stays the effect alone unless the whole act is baked, and publishing a game built on them wants Patch Desktop open on a Windows PC.
First the library hands back the frames, then it hands back the timing.
Source: GitHub | patch-gg/pixelfx
来源:CY · x.com