blob: 4958eed5d06f806fa2f51deab38913fed3e54937 (
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
32
33
34
|
---
title: 'Matrix Rain: 2025 refactor'
date: 2025-12-21
layout: post
project: true
thumbnail: thumb_sm.png
---
Unicode support added. ASCII + Katakana working:
<video style="max-width:100%;" controls="" poster="poster.png">
<source src="matrix.mp4" type="video/mp4">
</video>
Algorithm notes: mat.col[] = shuffled column indices, mat.row[] = last row per
column. shuffle() sets working set, main loop draws columns via index i (line
333), swap() rotates set.
Phosphor decay moved to LSB of RGB union. Should have done this originally.
RGB/PD union stays. Little-endian machine, portability not a concern.
Charset via UNICODE(min, max) macro - packs range into uint64, insert_code()
unpacks and selects random char.
Half-width Katakana (U+FF61-U+FF9F) for column alignment.
Removed license, automake files. Build: cc -O3 main.c -o matrix
Performance: 2% CPU, OpenBSD, T490.
Commit:
[03f8d87](https://git.asciimx.com/matrix-digital-rain/commit/?id=03f8d87ba7c2e46bd3f3cc4c772fb3a2ac740c92)
|