Raycasting Ray Setup Explained

ray_step = (PI / 3) / WIDTH;
ray_angle = player.angle - (PI / 6);

ray_step: Angular increment between rays (60° FOV ÷ screen width)

ray_angle: Starting angle (player direction - 30°)

This creates a 60° field of view centered on the player's facing direction.



What you're seeing:

Each ray represents one column of pixels on your screen. More rays = higher resolution but more computation.