Such a classic! I remember writing a raycasting engine in DJGPP (GCC for DOS), when I was teenager... Fast forward 25 years and hey, it can be done in TypeScript on a $2 microcontroller ;) (though it did take some effort to get TypeScript to run fast enough...)
https://arcade.makecode.com/14009-57824-16954-25349 https://forum.makecode.com/t/3d-raycasting-in-arcade/474