r/adventofcode • • 7d ago

Visualization What animation packages do you use?

I've done Advent of Code for the past few years and I'd like to try animating my solutions this time round. I've seen people over the years use a variety of animation software / packages to do their visualization, I'm curious for any specific reccs.

I usually use Python to code up my solutions and was considering learning Manim (the community version) or the base Matplotlib. I've also seen several people using TypeScript/JavaScript to animate. Open to any suggestions!

14 Upvotes

13 comments sorted by

6

u/ednl 7d ago edited 7d ago

I made this for AoC 2017 day 14 using p5*js which is essentially just drawing lines and squares on a browser canvas: https://ednl.github.io/defrag/

Code: https://github.com/ednl/defrag/blob/main/sketch.js (EDIT: oops I left my actual input in, changed it to the example now) which was quite a lot of work, so yeah, maybe there are better packages. From the same people originally, there's https://processing.org which is the java version, standalone and compiled = a lot faster.

3

u/Baking-and-books 7d ago

Wow I forgot all about processing! I used that a bit a loong time ago. I'll look into both of these, they look promising. And your viz looks sick!

4

u/Enip0 7d ago

I have never used it but when I read Python I was going to suggest manim, until I read the next line where you mention it yourself.

I hadn't thought about animating solutions, but I love the idea, I might try it myself even.

4

u/Suspicious_Tax8577 7d ago

That's what I love about AoC. Low barrier to entry, high ceiling. Didn't get the challenge you hoped for? Let's make time and space complexity really matter, or let's make the solution look pretty.

4

u/wizardeverybit 7d ago

I just used pygame to make animations

4

u/buxxud 7d ago

For numerical visualization in python, I like plot.ly a lot. If you want sprites and graphics primitives, pygame is a natural choice.

My plan this year is actually to do every day in picotron, including dynamic state visualization. We'll see how it goes!

3

u/EverybodyCodes 6d ago

JavaScript
I have my own AnyMap class which can produce gifs based on... any map or grid. I just need to decide where to take the snapshot and how to map values to colours or text. Behind the scene it uses gif-encoder-2: https://github.com/benjaminadk/gif-encoder-2

I was even mentioned in the community showcase because of the speed :) https://www.reddit.com/r/adventofcode/comments/1prrvfn/introducing_your_2025_reddit_one_winners_and/

New AoC Visualization Record: 14 Minutes[2025 Day 4 Part 2]

Other AoC visualisations:
https://www.reddit.com/r/adventofcode/comments/1pgd9ds/2025_day_7_part_2_visualization/

https://www.reddit.com/r/adventofcode/comments/1pcyjfs/2025_day_03_part_2/

https://www.reddit.com/r/adventofcode/comments/1hgv4pl/2024_day_18_visualisation_of_different_escape/

Also, one from the Codyssi event: https://www.reddit.com/r/codyssi/comments/1jlg247/journey_to_atlantis_patron_islands_path/

3

u/Boojum 5d ago

I use Python with a declarative animation micro-framework built around PyCairo. A few years ago, I wrote up and posted a guide based on my approach, and explaining how my framework works, among other things.

3

u/careyi4 7d ago

I am mostly writing lots of Rust these days, I vibed this up a while ago to help with visualisations for building https://systemscheck.dev puzzles. It ended up being pretty nice so I published it, from the download trends, it seems a few people have been using it, I find it meets my needs and I get some nice animations out of it. https://crates.io/crates/celluloid-core

Also, I am aware of the existing Python library of the same name, no connection, complete chance that they share a name as unbelievable as that may seem.

1

u/ffrkAnonymous 6d ago

In 2021 I used tic-80 to learn some Lua. There's python support but I've not tried it. And lots of other scripting languages. 

https://www.reddit.com/r/adventofcode/comments/r66wgb/aoc_2021_adventure_time/hp2acll/?utm_source=reddit&utm_medium=usertext&utm_name=adventofcode&utm_content=t3_ro2v1c

1

u/agorism1337 6d ago

ffmpeg and Image Magick.

1

u/Drizzelkun 1d ago

matplotlib using their FFMpegWriter (or FileWriter). maybe manim is easier / more powerful but i was already very familiar with matplotlib so I stuck with it

1

u/Synthetic5ou1 7d ago

I use r/php for AOC, but each year I try to visualise at least one day using r/pico8