“Trece años dedicò a esas heterogéneas fatigas, pero la mano de un forastero lo asesinò y su novela era insensata y nadie encontrò el laberinto.”
J.L. Borges, El jardìn de senderos que se bifurcan.

Doom Fire

It was rainy today, so I made myself a pixel fire.


It is the classic “Doom” fire effect, as described in Fabien Sanglard's website .

The idea is to use a “heat” value for each pixel, that indexes into a color palette going from white to red to black. The bottom row of the frame buffer is initialized with the maximum heat, and you then iterate over the lines to propagate heat to the upper lines, with some randomness. It is a fun little exercise to code and a nice visual effect.