blob: e2408345990e6b50d6cd3d468c37a28f2a9472ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<p>The famous digital rain from the movie The Matrix implemented in C for
the Unix terminal without using any GUI/TUI kits:</p>
<video style="max-width:100%;" controls="" poster="thumb.png">
<source src="matrix.mp4" type="video/mp4" />
</video>
<p>Domsson’s Fakesteak inspired
this project. I added the following features while trying to keep the original
project’s simplicity intact as much as possible:</p>
<ul>
<li>Customize the rain color to match the theme of the setup.</li>
<li>Support for UTF-32 characters.</li>
<li>The ghosting effect of old monochrome displays.</li>
<li>The rain more closely resembles the original from the first movie.</li>
</ul>
<p>To use them, you need a terminal emulator that supports 24-bit RGB colors and
Unicode characters.</p>
<p>The background, head, and tail colors of the rain can be configured via
<code class="language-plaintext highlighter-rouge">COLOR_BG_*</code>, <code class="language-plaintext highlighter-rouge">COLOR_HD_*</code>, and <code class="language-plaintext highlighter-rouge">COLOR_TL_*</code> settings. The <code class="language-plaintext highlighter-rouge">UNICODE_MIN</code> and
<code class="language-plaintext highlighter-rouge">UNICODE_MAX</code> values control the character set used for the rain. For instance,
use <code class="language-plaintext highlighter-rouge">0x30A1</code> and <code class="language-plaintext highlighter-rouge">0x30F6</code> for Katakana:</p>
<p><img style="width: 100%;" src="katakana.png" /></p>
<p>Happy ricing!</p>
<p>Files: <a href="source.tar.gz">source.tar.gz</a></p>
|