lichess-org / lila-gif Goto Github PK
View Code? Open in Web Editor NEWWebservice to render Gifs of chess positions and games, and stream them frame by frame
License: GNU Affero General Public License v3.0
Webservice to render Gifs of chess positions and games, and stream them frame by frame
License: GNU Affero General Public License v3.0
Optional (by additional argument) showing good moves, mistakes and blunders when computer analisys is available as Lichess does (exclamation mark, question mark, etc).
Like the "inside the board" style on Lichess.
Hello! 👋
I’m not sure if this is the best place to ask and share about this, but I decided to start working on a MP4 generator akin to this. I don’t know Rust, so I decided to just write it in C.
I feel like it’d be easier to use than the GIF exporter in Lichess, specially for longer games, because then people can just seek around the game more easily.
I have put my current code in a Gist: https://gist.github.com/zamfofex/3bb038ea2861d042a2a2db10c002b8e4 (It is released under the GPL, v2 only, to match two of its dependencies.)
There are a few missing features, most notably the ability to flip the board (see from black’s perspective) and player name labels. I can continue working on it if there is interest in using it for the purposes of Lichess, otherwise I think I’m okay with leaving it as is.
Thoughts would be appreciated!
support for green/yellow/blue arrows, want it for showing last move/explain positions
Now we can only output a gif from a series of fens, I think it's useful to add a function to output gif from a pgn.
Please consider it seriously. Thanks
When I or the other player have done something really embarrassing, yet interesting, I don't want the player names to show, just the game :)
Could you provide this option?
Currently, if you send a board theme that is unrecognized, you get an error:
http://localhost:6175/image.gif?fen=7R/8/8/8/8/8/rr6/R1BQK2B&theme=purple2
Failed to deserialize query string: unknown variant `purple2`, expected one of `blue`, `brown`, `green`, `ic`, `purple`
Lets gracefully fall back on the default board theme. I started trying to do this, but my rust knowledge is too lacking at the moment.
Bonus could be to smartly fall back. For instance, blue2
could fall back to blue
.
First of all, thanks for your contribution to lichess, and I love the use of Rust.
I just played a fun attacking game as white that I wanted to share to my all my friends, but most of the opening moves, and also towards the end, is played back way too fast to follow. It could seem like you use some kind of algorithm that utilizes the entire game length as a variable – and thus could create funky results with fast/premoves in longer time controls (this was rapid 10+0). I will go read the source now.
TLDR: Fast/pre-moves in rapid games are replayed way too fast in GIF
The GIF endpoint could also contain a field for the game result. In PGN it's usually included in the Header or at the very end, like "{ Black wins on time. } 0-1"
This could then be shown on a final frame, as the viewer currently can only guess the result, especially if won on time. This would also remove the need to show the last frame longer manually.
In case the field in the endpoint is not set, the GIF can just be generated like it currently is.
Hi, today, I saw someone struggle 2h30 to set this application because 127.0.0.1 was used instead of 0.0.0.0 in main.rs
you can see this on https://www.twitch.tv/videos/635148825
i think it start around 1h05 of video and he fix it at 3h40 of video.
Could you add a note IN BOLD somewhere in the readme, please?
(this post saved us: https://stackoverflow.com/a/58802065/3429116 )
There was new piece type added kiwen if lichess gifs support it
Currently ratings are not shown with ? If they are provisional, would make sense to add those
Thanks
I was seeing an update on coming for different pieces and board colours, was wondering if adding 3D sprites to generate chess images and gifs can be possible. Note just suggesting an idea, if it is possible it would make lichess gifs even better, but also practical for sharing the games in OTB POV.
Thanks
Right now whenever I export gifs and it’s black turn it shows on white side, is there a parameter I can pass/some other automatic way to get black’s view? Because in screenshot the chess FEN do show who’s turn is it in the notation.
I'm working on it.
Lichess gifs are a great way to show games, but having a clock time stamp can be helpful to provide more insights into the game, for example, if the player lost on time, or they blundered a piece because of time pressure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.