I needed a good art pipeline for my RTS-from-scratch project and after some deliberation I came to the conclusion that I should forgo any preprocessing steps and should just load Aseprite files directly. All the information I need, mainly animation data, but also things like layering and Z-order information was already right there.

However, there was no Aseprite decoder for C at that moment so I decided to write one myself.

After 4 days of coding and 1 day of rest it is now production ready: https://github.com/API-Beast/ase_read

  • It is fast, in my testing small ase files can be read and blitted in <1ms, while larger ones take <10ms.
  • It is small, one header, one implementation, ~2000 LOC.
  • It extracts all the meta data you care about: animation tags, slices and user data.
  • ase_draw_frame implements all 18 blend modes available in Aseprite for complex layer setups.