Over the past few years, I've always been fascinated with animations, cartoons and Rube Goldberg machines. Just this week, I was taking a look at a crazy thing I never knew was possible: animations in the terminal. This was mind blowing to me, and this filled me with excitement and fervor to create an animated Rube Goldberg machine in the terminal.
What it does
The Rube Goldberg machine is a machine that does a simple task, but in an unnecessarily complicated way. The program executed in the demo shows a Rube Goldberg machine of a ball, dominoes, and an anvil. The ball hits the dominoes and the anvil and both fall down. The task is simply to show the silliness of animations carried out by the anvil and dominoes. You can see, it does the task pretty well in the end.
How I built it
Grabbing inspiration from VT100 terminal animations back in the 1970s, I took a look at the source code of them and found simple instructions for the terminal to move the cursor from one place to another. This was fascinating stuff, there were so many modes and things one could do in the terminal to display graphics and etc. Every ascii graphic you see in the demo is handmade and appears as seen in the source code.
Challenges I ran into
One of the first challenges I ran into was figuring out how the source code the VT100 terminal animations worked back in the 1970s. I had to watch hour long videos one after another until I figured it out. At that point, all that was left to do was add the ascii image. But, there was one small problem. You might think I'd have specifically created each frame by hand. This was the problem. I didn't want to create each frame by hand over and over again. The file would get extremely big. I looked back at how the VT100 terminal animations did it and they surprised me. I hadn't fully understood how terminal cursor movement worked. It turns out, you can point the cursor to a range of characters and edit only what you need. This made everything amazingly simple and easy to do. It also made coloring some scenes feel like a breeze.
Accomplishments that I'm proud of
I'm proud to say that I've created a Rube Goldberg machine in the terminal that is not only complex, but colored (unlike the original VT100 terminal animations) and most importantly silly. This was the most fun, yet tedious thing I've ever created.
What I learned
I learned how the terminal works, how its behavior can be manipulated to create things like animations or otherwise. I learned that to make something silly, you must become silly, you must embody the feeling of being silly. I also learned how to animate ascii in the terminal
What's next for Sillymation
Sillymation was very fun to work on and very tedious. One thing we wanted to do is make the process simpler for others, so that no one else has to go through this long process. I've looked online for simple ascii drawing programs, but they don't exist for some reason. So, one thing we could do is create an ascii drawing program that tailors to the final result on the terminal using templates and configuration options, like color or otherwise.