lila icon indicating copy to clipboard operation
lila copied to clipboard

Make the GIF export aware of user's piece set configuration

Open mlgarchery opened this issue 2 years ago • 5 comments

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.

mlgarchery avatar Aug 02 '22 17:08 mlgarchery

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. :)

brollin avatar Aug 03 '22 01:08 brollin

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.

brollin avatar Aug 04 '22 00:08 brollin

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?

brollin avatar Aug 04 '22 01:08 brollin

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.

niklasf avatar Aug 04 '22 05:08 niklasf

Okay sounds good - I think I will start with the SVG boards only, in order to scope the task a bit.

brollin avatar Aug 04 '22 07:08 brollin

Nice work ! It's beautiful :)

mlgarchery avatar Sep 25 '22 16:09 mlgarchery