Replays are awesome but I’m thinking they could be improved in some ways. When posting to social media, instead of the link which requires players to open the site (which is really not that great on mobile), it would be neat to have an animated gif of the replay, or at least a few frames of the replay with a link to the full replay on the site.
Currently when you link to a replay, the CodinGame static image is displayed. At a minimum, generate a snapshot of the replay and include it on the replay page. That way, it would show up on the social media post instead of the default CodingGame image.
It’s a really good idea! Actually we think about it for a long time.
Unfortunately, it’s not that simple since rendering only happens in your browser…
Is it html behind that rendered by our browser? A solution could be to render this html in a javafx webview and take snapshots of it (really simple in javafx). Then you can create an animated gif using some tools like ffmpeg for example.
i don’t say it’s impossible, i say it demands a lot of work!
Yes - not a trivial feature to implement but definitely one that would be cool to tackle. I wonder if you could use a fleet of PhatomJS -based renderers to render the replays, frame-by-frame and capture to .gif.
Even if it’s not the whole replay, perhaps a few frames would be better than the static images.