C++ Matrix: The Matrix Reloaded in Terminals (Number falls, Banners, Matrix rains, Conway's Game of Life and Mandelbrot set)
C++ Matrix: The Matrix Reloaded in Terminals (Number falls, Banners, Matrix rains, Conway's Game of Life and Mandelbrot set)
I wrote a simple terminal program of Matrix digital rain. A part of the purpose of this program is to test the performance of terminal emulators. Another purpose is just for fun. Enjoy it with fast terminals (e.g., urxvt, alacritty, terminology, etc.)!
Features
Scenes
By default, the following scenes will be visited in turn.
If you want to see each scene, please see the help (cxxmatrix --help).
This program is provided under the MIT License.
256color and UTF-8 support$ git clone https://github.com/akinomyoga/cxxmatrix.git
$ cd cxxmatrix
$ make
$ ./cxxmatrix 'The Matrix' 'Reloaded'
Quit: C-c; Suspend: C-z; Menu: RET, C-m
Compile MSYS2 binary (MSYS2 PTY) using MSYS2
The MSYS package msys2-devel is required in order to use the MSYS2 compiler.
msys2$ pacman -Syu
msys2$ pacman -S git gawk make msys2-devel
msys2$ git clone https://github.com/akinomyoga/cxxmatrix.git
msys2$ cd cxxmatrix
msys2$ PATH=/usr/bin:$PATH make
Compile Windows binary (ConPTY) using MinGW/MSYS2
The Windows binary based on Windows Pseudo Console API (ConPTY) can be compiled on MinGW/MSYS2 by passing TARGET=win32 to make.
It should be noted that ConPTY is extremely slow.
msys2$ pacman -Syu
msys2$ pacman -S git gawk make mingw-w64-x86_64-gcc
msys2$ git clone https://github.com/akinomyoga/cxxmatrix.git
msys2$ cd cxxmatrix
msys2$ PATH=/mingw64/bin:$PATH make TARGET=win32
Check the help with cxxmatrix --help:
…
Select scenes
# Example: Show the Mandelbrot set
./cxxmatrix -s mandelbrot
# Example: Loop Number falls and Conway's Game of Life
./cxxmatrix -s number,conway,loop
sudo make install
The default install prefix is /usr/local. The following files will be created:
/usr/local/bin/cxxmatrix/usr/local/share/man/man1/cxxmatrix.1.gz/usr/local/share/licenses/cxxmatrix/LICENSE.mdThe make variable PREFIX can be specified to change the install prefix.
To copy files in a temporary location, the make variable DESTDIR can also be specified.
To change the subdirectory of LICENSE.md, the make variable INSTALL_SUBDIR_LICENSE (whose detault value is share/licenses/cxxmatrix) can be adjusted.
# Example 1: install cxxmatrix in user directory
make install PREFIX=~/.local
# Example 2: install cxxmatrix in /opt
sudo make install PREFIX=/opt/cxxmatrix
# Example 3: create a package
make install DESTDIR=/tmp/packages/cxxmatrix PREFIX=/usr/local
# Example 4: put LICENSE.md in /usr/local/share/cxxmatrix
sudo make install INSTALL_SUBDIR_LICENSE=share/cxxmatrix
Nuno Teixeira )Related tags in GitHub:
In each section, the projects are ordereded by the number of stars, which is shown in parentheses for each project.
This list including the numbers of stars is updated when cxxmatrix is updated so does not reflect the current status.
The numbers of stars are last updated on 2022-03-24 19:57:14 JST.
No open issues yet, or sync has not completed.