The function first checks params->side:
Where offset adjusts for which side of the grid cell we hit.
This gives us the precise coordinates where the ray intersects the wall.
Raycasting: A technique used in 3D games to determine what the player can see by casting rays from their position.
Grid-based World: The world is divided into blocks (BLOCK size), where walls exist at grid boundaries.
Step Direction: Determines whether we're moving in the positive or negative direction along each axis.
Hit Point: The exact pixel coordinate where a ray intersects with a wall surface.