General
Put your particle effects in CI: the silent-skip bug nobody catches by eye
Sam Novak DEV Community 周榜
2 views
Most particle editors are GUI-first, which is correct: authoring a visual effect by typing numbers is a miserable way to work. But once the effect exists, it is a file, and files belong in the same machinery as the rest of your project.
I spent an afternoon wiring our VFX into CI and it caught a class of bug we had been shipping for months.
The bug class
A portable effect format usually means one description consumed by multiple renderer backends. That is the whole point. What it does not mean is that every module is implemented on every backend.
We moved an effect from the Three.js path to a 2D Pixi path. It rendered. It just rendered wrong, in a way nobody could name, and it took an embarrassing amount of squinting to work out that a velocity-over-lifetime module had been silently dropped because that backend does not implement it.
It was not an error. It was reported, correctly, in an unsupported-modules list on the stats object. Nobody was reading the stats object.
Making the machine read it
The useful realisation is that this is a test, not a debugging technique. If the runtime will tell you which modules it skipped, you can assert on that in CI:
Load every effect file in the repo
Instantiate it against each backend the game actually ships
Fail the build if the unsupported-module list is non-empty for a backend that effect is used on
That is maybe thirty lines. It turns a silent visual regression into a red X on a pull request, which is the entire difference between a bug you fix in a minute and one you ship.
Validation and generation, while you are there
Two more things fall out once effects are scriptable from the command line.
Validate on commit. A malformed effect file should not reach a build. A validate step in a pre-commit hook or CI job is cheap and stops the "works on my branch" version of VFX bugs.
Generate variants. We had five near-identical pickup effects differing only in tint. Those are now generated from one source plus a colour table, which means a change to the shape of the effect does not require an artist to open five files and remember what the other four looked like.
A caution on that last one: generation is great for mechanical variants and terrible for anything where an artist is making a judgement call. If someone would want to nudge it by eye, it should not be generated.
Getting started
You need two things from your tool: a documented project-file schema, and a CLI that can create, validate and export without a display. If your tool has both, the CI work above is an afternoon. If it has neither, that is worth knowing before the format becomes load-bearing in your pipeline.
The NixieFX CLI reference documents the project schema and the create, validate and export commands, which is what I used for the above. Disclosure: I work with that team. The CI idea is tool-agnostic, and the unsupported-module assertion is the part I would steal first.
Read original: https://dev.to/sam_novak_574b07811e18495/put-your-particle-effects-in-ci-the-silent-skip-bug-nobody-catches-by-eye-5cpa
← Previous
What Does a Production RAG System Need? Vector Search, Chunking, Guardrails, and Cost Controls
Next →
Designing a Production-Ready Data Science Pipeline: From Raw Events to Monitored Models
Related
One Callback URL Misconfiguration Leaks Every OAuth Token
General
2
DEV Community 周榜
The ffmpeg Pipeline Nobody Explains
General
2
DEV Community 周榜
Designing a Production-Ready Data Science Pipeline: From Raw Events to Monitored Models
General
2
DEV Community 周榜
What Does a Production RAG System Need? Vector Search, Chunking, Guardrails, and Cost Controls
General
0
DEV Community 周榜
Comments0
No comments yet — be the first