summaryrefslogtreecommitdiffstats
path: root/_projects/matrix-digital-rain.md
diff options
context:
space:
mode:
Diffstat (limited to '_projects/matrix-digital-rain.md')
-rw-r--r--_projects/matrix-digital-rain.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/_projects/matrix-digital-rain.md b/_projects/matrix-digital-rain.md
new file mode 100644
index 0000000..c385907
--- /dev/null
+++ b/_projects/matrix-digital-rain.md
@@ -0,0 +1,38 @@
+---
+title: The Matrix digital rain
+date: 2024-01-12
+author: W. D. Sadeep Madurange
+thumbnail: thumb.png
+layout: post
+---
+
+The famous digital rain from the movie The Matrix implemented in C for
+the Unix terminal without using any GUI/TUI kits:
+
+<video style="max-width:100%;" controls="" poster="thumb.png">
+ <source src="matrix.mp4" type="video/mp4">
+</video>
+
+Domsson's {{< link src="https://github.com/domsson/fakesteak" class="external"
+target="_blank" rel="noopener noreferrer" >}}Fakesteak{{< /link >}} inspired
+this project. I added the following features while trying to keep the original
+project's simplicity intact as much as possible:
+
+- Customize the rain color to match the theme of the setup.
+- Support for UTF-32 characters.
+- The ghosting effect of old monochrome displays.
+- The rain more closely resembles the original from the first movie.
+
+To use them, you need a terminal emulator that supports 24-bit RGB colors and
+Unicode characters.
+
+The background, head, and tail colors of the rain can be configured via
+`COLOR_BG_*`, `COLOR_HD_*`, and `COLOR_TL_*` settings. The `UNICODE_MIN` and
+`UNICODE_MAX` values control the character set used for the rain. For instance,
+use `0x30A1` and `0x30F6` for Katakana:
+
+<img style="width: 100%;" src="katakana.png" />
+
+Happy ricing!
+
+Files: [source.tar.gz](source.tar.gz)