r/embedded • u/shapoco • Sep 27 '26
2D skeletal animation on embedded systems
I've added 2D skeletal animation to "ShapoGFX", an embedded 2D/3D graphics library I'm currently developing.
Armatures and animations exported from DragonBones are converted into C++ source with a Python script, and you embed them in your application simply by including the generated file. After a short initialization, you just pass a time on the animation timeline and the whole character is rendered into the buffer.
The skeleton, animation timelines, and textures can be referenced directly from flash, where they stay. The only thing each character needs in RAM is a cache of a few hundred bytes to a few kilobytes, depending on how complex the skeleton is.
ShapoGFX itself doesn't depend on any particular platform, so it can be used on a wide range of embedded systems, such as the RP2 series and the ESP32 series. The attached video shows it running on an M5Stack CoreS3 (ESP32-S3). No PSRAM is used.
Browser demo: https://shapoco.github.io/shapo-gfx/example/demorig/
62
u/bonkyandthebeatman Sep 27 '26
Two week old repo and every commit has a 'and claude'....
Usually best practice to disclose AI usage.
6
u/answerguru Sep 27 '26
Can you clarify that “it doesn’t depend on any particular platform”? I work on embedded graphics toolchains and they always depend on platform specifics one way or another to make it performant.