lila
lila copied to clipboard
Make the GIF export aware of user's piece set configuration
Currently, exporting as a gif uses the default piece set. They are beautiful piece sets (I personally like the tatiana or staunty ones), and I greatly appreciate using them for my games. I think players want to stay consistent with the configuration they chose, and not having a different piece set when they share GIFs of their games.
This would be pretty cool to see. The bulk of the work would be in lila-gif
which is written in Rust, in case any Rustaceans are interested in taking this on. :)
I'm going to get started making the sprites needed for rendering various piece sets/board themes. If I'm feeling bold later, might try to learn enough Rust to implement them into lila-gif
.
Hey @niklasf, wondering what you think of my planned approach. I see that there are 5 board themes and 30 piece sets that are in SVG format. My plan was to create sprites for the combination of those, so 150 sprites total. The current sprite is 58 KB in GIF form, so all 150 might be around 8.7 MB.
I'm guessing loading that many sprites into lila-gif
won't be a problem. However, if we implement more board themes, I can see this not scaling particularly well. Would you recommend another approach, or does this seem reasonable for now?
Hi @brollin. Going for all the combinations seems fine. Otherwise we'd have to change lila-gif's approach completely.
The current sprite format assumes that all dark and light squares are identical, respectively. So if we want to support the more fancy boards, we'd have to go for somewhat larger sprites. But even that should still be fine.
Okay sounds good - I think I will start with the SVG boards only, in order to scope the task a bit.
Nice work ! It's beautiful :)