implement ray-casting on 2D world