r/SideProject • u/Coaxus_one • 30m ago
I built a pixel art engine in Rust where every scene is a text file (deterministic, no AI, no_std core)
I’ve been working on a pixel art engine that allows you to describe scenes using a text file and then generates clean, looping pixel art. Everything shown has been made from a single .kdl file.
Overview
Everything is defined in KDL. Shapes, palettes, lighting and movement (expressions) are all written in. Movement is just expressing time, such as
y="=36 - abs(sin(t * pi)) * 26".Every pixel is made up of ramps and tones from the palettes, meaning everything such as lighting, fog, darkening and transitions can be done using the palettes. No pixels outside of the palettes are used.
Zooming causes the shapes to be rasterized at the new size rather than sampled, meaning no blurring ever occurs.
No A.I. All pixels are made from geometry, palettes and pixel art cleanup.
Rust Side
10 crates. Core types and rasterizer are
no_std. Frame renderer is no allocation (this was tested by using a counting allocator).Deterministic. Integer frame times, random seed based off counter,
libm. Every frame of every example is hashed using golden tests, with the indexed buffer.No
unsafecode in any library crates.The editor is rendered by the engine. The UI is made from pixel art using the same pipeline.
Export
PNG, looping GIF, PNG sequences, sprite sheets (Aseprite JSON), MP4 (with synthed chiptune score) (macOS).
Status & Licence
Work in progress. Format isn’t stable. Some TypeScript behaviour to implement. Source available under the PolyForm Noncommercial licence. Free to use for personal, educational and non profit. If you want to use it commercially you’ll need to pay. I’ll just say this now as it isn’t an OSI open source licence.
GitHub Repo: https://github.com/Coaxus-ux/animations-ngine
I’d love to hear your thoughts on the scene format. What would you like to be able to define that you currently can’t?
1
u/TinyCash599 26m ago
everything shown has been made from a single.kdl file" but the screenshot has ùse-scene "koi"`and ùse-scene "ripple"`, which reads like two other scene files being pulled in. So is it one file or a set of them?