Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Tiny bitfield based text renderer (2022) (onirom.fr)
106 points by aebtebeten on March 15, 2024 | hide | past | favorite | 17 comments


Fascinating in-depth write up

> Another idea would be to render tiles and modifying the tiles content by just modulating the bit fields or map a set of tiles differently or do simple transforms using bitwise operations such as mirroring, once you have a complete set of tile operations you can combine them to compose detailed patterns / images, ones could also animate tiles individually by switching values in a cyclic fashion…

Could something like the wave function collapse algorithm[1] be used for this, ie. generating tiles that are similar to a certain base pattern?

[1] https://github.com/mxgmn/WaveFunctionCollapse


Huh, that’s a cool algorithm. Thanks for bringing it up!


This does seem like a great use case for it.


is this known as a procedural generation?


Yes, it is probably its main usage

The author of the GitHub repo is a pretty successful game author and has used it many times for his games

Here’s a talk by him talking about procedural generation using wave function collapse: https://m.youtube.com/watch?v=0bcZb-SsnrA


This touches on something I've wondered: Which written languages best lend themselves to small pixel fonts? I only ever see tiny fonts for English Latin script.


It's kind of cheating, but Braille should all fit in a 3x2 font.

You'd need a language that doesn't rely on accent marks or pictograms for sure (unless they have a very tiny set of characters), and that probably eliminates a lot of languages.


Latin accents could perhaps be represented as digraphs for such a tiny font.

Some languages have an official mapping, like in German where you can usually replace ä with ae, ü with ue, and so on.

Otherwise the accent could be a separate character, as in cafe’. Probably would be acceptable for this application.


Scripts are products of their processes. For example, musical notation looks the way it does because it was created when people used quill and ink to create the notation. Scripts that we use for writing have their origins in hand-writing and printed wood/lead.

So it's also possible to flip this around. What script could be designed with its basis being a 3x3 grid? That would allow you to create forms which are maximally distinct from each other, without needing to conform to a script like Latin characters.


Has been done, Marain script from Iain M. Banks' Culture novel series:

https://www.omniglot.com/conscripts/marain.htm


All may not get so close to seeing the light outside the Biau of Sin ai: https://news.ycombinator.com/item?id=38800719


If you think about that, 2x3 or 3x2 is the practical minimum. A fully empty glyph and a single dot wouldn't be really useful, and any translation would be too ambiguous for 2x2 grid, so we only have 8 possibilities:

    .@  .@  @.  @.  @@  @@  @@  @@
    @.  @@  .@  @.  ..  .@  @.  @@
This is too small for any actual, natural written language. 2x3 and 3x2 significantly increase possibilities and it is indeed not too hard to pick unique glyphs for a large subset of alphabets. Rotokas [1] only uses 12 unaccented Latin alphabets for example, so the following would marginally work:

    .@  @@  @@  .@  @.  @@  @@  ..  @.  @@  ..  ..
    @@  @.  .@  .@  @@  @@  @@  @@  @@  .@  @@  @@
    @@  @@  @@  .@  @@  @@  @.  @.  .@  .@  @@  @.
     A   E   g   I   K   O   P   r   S   T   u   v
Maybe you can make the question much more interesting by allowing non-square and/or non-uniform pixels, i.e. segmented displays. That still has a lot of design potentials even to this day.

[1] https://en.wikipedia.org/wiki/Rotokas_language


Technically the binary language of moisture evaporators would be a good example. But for humans, perhaps Quipu/Khipu. Morse code too, I guess.


What is ORZ ? Just a funny alias i am using for my demoscene stuff, it is related to the Orz alien species of my favorite adventure game : Star Control 2

A different part of the Internet will be reminded of something else, especially upon seeing that first image:

https://en.wikipedia.org/wiki/Emoticon#Orz


Kind of funny that the only way to download the 256 Byte demo is to download a 19.6 MiB zip file containing a video recording of the demo.

https://files.scene.org/view/parties/2022/lovebyte22/executa...


It's not the only way, try this:

1. Click on the "my demoscene stuff" link

2. Click on "Mmrnmhrm" link

3. Click "[source]"

4. Arrive at https://github.com/grz0zrg/codegolfing/tree/main/Linux/Mmrnm...


I know it was not intentional, but I kinda like the idea of "navigation by obscurity", leading the visitor on a wild goose chase through a web of hyperlinks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: