Doom’s predecessor Wolfenstein 3D was famous for using ray casting, and the Doom engine inherited ray casting and extended it to handle different floor heights. https://lodev.org/cgtutor/raycasting.html
1. https://www.doomworld.com/forum/topic/71128-so-is-doom-a-ray...