basically it spawns a little sprite at the player, and said sprite starts -45 degrees to the player. It goes forwards until it hits something, and then adds the distance it travelled to a list (with some wall-warping correction). It then goes over said list, and the bigger the distance, the smaller the correlated line is. This creates a 3D-ish appearance with very little maths involved.