Today I finished implementing the core rendering loop for my 3D C++ raycasting engine and also added player-wall collision detction!
In summary, for every column of your screen, a ray is fired to draw a single vertical strip of a specific size based on how far that ray travels. Then all these strips are combined to form a 3D scene. I also added shading to specific sides of walls.
I then learned how to fix edge distortions (fish-eye correction) and uneven ray distributions using math + geometry.
I also spent ALOT OF MY TIME trying to fix a bug where the player could clip into a corner and get stuck inside, which got very annoying to debug. But I eventually solved it by checking for wall overlaps across the player’s every possible movement position.