TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

F9 should record to APNG rather than GIF

Open ToxicFrog opened this issue 4 months ago • 2 comments

Animated GIFs have two big problems when used for this:

  • they are limited to 256 colours, which is not sufficient for games that use tricks like wiggling the palette every frame or scanline;
  • they are limited to framerates that evenly divide 100fps.

TIC-80 deals with the latter, sort of, by recording at 30fps and then writing a GIF with a frame time of 3 hundredths, which results in a visibly sped up 33⅓fps playback. I'm not sure what happens if you attempt the former.

APNG addresses both these problems (APNGs can have arbitrary framerates and support 8bpc RGBA colour), and given that TIC-80 already has a PNG writer, the differences needed to write APNGs are not overwhelming even if your PNG writing library does not support them natively. Given that support for them is now widespread I think it would be good to move to APNG for TIC-80's native recordings.

In the meantime, it is at least possible to convert the recorded GIFs to APNG (as long as you don't exceed the colour limit) and correct the frame timing in the process, although this still only gives you 30fps recordings.

ToxicFrog avatar Aug 19 '25 12:08 ToxicFrog

neither option records the audio though :/

imsys avatar Aug 30 '25 06:08 imsys

This is true, but recording to video is a bigger task while recording to APNG is mostly just a repurposing of code it already has, so I felt like this was a more reasonable request.

ToxicFrog avatar Sep 10 '25 10:09 ToxicFrog