Martin Kirkholt Melhus

Set Fire to your Windows Desktop with WinAPI and Rust

Published

Bring the Doom fire animation to your desktop with Rust and WinAPI

Turns out it's fairly easy to draw bitmaps on the screen on a windows system using the WinAPI. Inspired by Fabien Sanglard's excellent writeup of how the Doom fire effect was implemented, I decided to bring the fire animation to the windows desktop. The code is available on GitHub, and is implemented in Rust. Graphics are rendered using WinAPI with notable use of the function SetDIBits to update pixels in a bitmap, and StretchBlt to scale and draw the bitmap on the screen.

Snake CSS Gameplay