Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pockets for the Crazyhouse GIFs #6090

Open
notruck opened this issue Feb 27, 2020 · 1 comment
Open

Pockets for the Crazyhouse GIFs #6090

notruck opened this issue Feb 27, 2020 · 1 comment
Labels
improvement Small incremental improvement to an existing feature

Comments

@notruck
Copy link

notruck commented Feb 27, 2020

The new "Share as a GIF" option is almost instantaneous, and it's such a useful feature. Thank you for that!

The current implementation seems to work well for most variants. It would be nice if the Crazyhouse GIFs can display the pockets too, Also, because of the extra information the viewers will be having to process, perhaps the replay speed for zh images could be made slightly slower than the others?

Thank you for your time and consideration!

@niklasf niklasf added the improvement Small incremental improvement to an existing feature label Feb 27, 2020
@niklasf
Copy link
Member

niklasf commented Feb 27, 2020

Performance: Thanks, hearing that makes me happy! I spent quite a bit of time on it.

Timing: There's some WIP on taking the actual move times into account. The open question is how to scale or cap it, so that slower games do not feel too slow.

Crazyhouse: I don't plan to add support myself, but if someone wants to write some Rust to add support for pockets, here are the steps:

  1. Add pocket pieces to the SVG sprite (https://github.com/niklasf/lila-gif/blob/master/theme/sprite.svg).
  2. Use Gimp to render with indexed color palette (currently 63 colors) and square size 90, updating the GIF sprite (https://github.com/niklasf/lila-gif/blob/master/theme/sprite.gif).
  3. Add a getter to select the pocket sprite to Theme (similar to https://github.com/niklasf/lila-gif/blob/1d27cc1fcd2b5b91a22850b3e69082ed1e94d0f5/src/theme.rs#L104-L108).
  4. Actually render pockets (https://github.com/niklasf/lila-gif/blob/master/src/render.rs). params.fen already has the required Crazyhouse pocket data: https://docs.rs/shakmaty/0.16.2/shakmaty/fen/struct.Fen.html#structfield.pockets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Small incremental improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants