To cover a lot of use cases, a core set of multimedia formats could be added to LÖVE.
The following list is what I would currently want to implement for a game engine:
- video => webm + vp8 + opus
- audio (music/sound) => ogg + opus (lossy) | ogg + flac (lossless)
- audio (VoIP, packet-based) => opus
- image => webp
All of these are royalty-free formats with implementations under permissive licences like BSD.
Adding formats is difficult, so I think the most interesting ones to add to LÖVE would be WebP and Opus (there is already WAV for lossless audio or Ogg/Theora instead of WebM/VP8; which can use Opus for audio).
WebP:
- simple API (libwebp)
- lossy/lossless with alpha format; seems to perform better (quality/space) than PNG and JPEG
- sequences/animations (could be loaded as array textures)
-
Opus:
- one of the best lossy formats for music/voice/sound
- also designed for VoIP (packets)
WebP is supported by Chrome/Chromium and recently by Firefox, here are examples of a WebP animation as an atlas and a sequence, with a black or alpha background (125 frames, 128x128).
2,0M anim_add_animated.webp (forgot to make this one loops)
888K anim_add_animated_lossy.webp (q = 100 to reduce artifacts)
1,5M anim_alpha_animated.webp
696K anim_alpha_animated_lossy.webp (q = 75)
atlas:
1,9M anim_add.webp
336K anim_add_lossy.webp (q = 75)
1,3M anim_alpha.webp
652K anim_alpha_lossy.webp (q = 75)
Animation examples are not very interesting here because using an atlas is OK, but there are use cases where each object could have orientations, so the idle animation would be intuitively constrained in one axis of the image. Imagine now having multiple animations of the same length in the same file for a single object for different orientations, it's OK with sequences and array textures, otherwise you need to fragment in multiple files; which is OK too, but you have now other alternatives.
The best of WebP to me is about lossy alpha; you can improve the compression of big alpha animations without having to make a choice between JPEG (no alpha) or PNG (lossless).
Edit: another example.
For HD isometric tiles like this (3.6 Mio).
Lossless WebP: 1.6 Mio (~55% reduction)Lossy WebP (q = 75): 452 kio (~87% reduction)
For 1 Go of this kind of resource (supposing similar compression), we could reduce it to 500 Mo while still using lossless compression. If we can afford loss, we could reduce it to 200 Mo.