News for hackers. Stuff that matters.
Re:My First “Conway's Game of Life” Program in Tribute to Jo... by anonytrary on Wednesday April 15, 2020 @10:57PM (#22885591)
Good work! Highly recommend adding a gif of a few seconds of your game in your README so people can enjoy this without having to build and run it.
Re:My First “Conway's Game of Life” Program in Tribute to Jo... by slavik81 on Wednesday April 15, 2020 @11:30PM (#22885762)
Do you have any recommendations on how to do that? I tried to make a gif for my project a month or two ago by capturing my terminal output in ttyrec, then using ttygif to turn it into an animated image. However, ttygif ultimately passes things off to ImageMagick convert, which would run until my computer ran out of memory and then crash.

I tried using ffmpeg to create a video instead of a gif, but I struggled getting it to correctly reproduce my colours and I couldn't figure out how to handle the occasional variation in time between frames in my capture.

Re:My First “Conway's Game of Life” Program in Tribute to Jo... by slavik81 on Thursday April 16, 2020 @08:50PM (#22895170)
Following up on this, I was inspired to try again. I decided to give APNG tools a shot, as it seems that APNG support is pretty good these days[1]. It was straightforward to build apngasm[2] and ttygif[3] from their GitHub sources on Ubuntu. I modified ttygif to generate a command for apngasm rather than for convert, and found that it could easily handle my data.

Unfortunately, apngasm does not seem to handle gamma correctly, resulting in more muted colours in the output APNG than in the input PNGs. If I can find the time, I'll fix that up and open-source the various tweaks I made. My current results are[4][5], though I may update those images as I improve them.

On a related note, it seems that it's no longer possible to remove the window decorations from gnome-terminal on Ubuntu 19.10, which is unfortunate for ttygif captures. I switched to my Ubuntu 18.04 machine to do a capture without the window border.

[1]: https://caniuse.com/#feat=apng [2]: https://github.com/apngasm/apngasm [3]: https://github.com/icholy/ttygif [4]: https://slerp.xyz/demos/ascii-euler/block.png [5]: https://slerp.xyz/demos/ascii-euler/waterfall.png

Re:My First “Conway's Game of Life” Program in Tribute to Jo... by slavik81 on Saturday April 18, 2020 @01:03AM (#22905453)
One final update, I think part of the colour problem was actually because the Ubuntu terminal is slightly transparent by default, and different alpha blending resulted in slightly different colours.
Re:My First “Conway's Game of Life” Program in Tribute to Jo... by pcmonk on Wednesday April 15, 2020 @11:41PM (#22885823)
For terminal stuff, you can't beat the ease of use of asciinema.
Re:My First “Conway's Game of Life” Program in Tribute to Jo... by slavik81 on Thursday April 16, 2020 @12:18AM (#22885993)
That's what I'm currently using, but I think a gif/video would work better for my program. My recording is supposed to run at ~10fps and the asciinema web player can't keep up. I get less than 1fps on the first play-through, and it dips as low as 2fps on subsequent plays.
Re:My First “Conway's Game of Life” Program in Tribute to Jo... by vpontis on Thursday April 16, 2020 @01:03AM (#22886235)
Licecap / Zappy

Or Loom -> MP4 -> ezgif

There's a lack of good GIF making tools

Re:My First “Conway's Game of Life” Program in Tribute to Jo... by lufte on Thursday April 16, 2020 @07:38AM (#22888376)
I use recordMyDesktop. If what I need is a gif, then I convert it with ffmpeg.
Re:My First “Conway's Game of Life” Program in Tribute to Jo... by core_dumped on Thursday April 16, 2020 @02:10PM (#22891960)
I went ahead and added one, thank you for the suggestion!