We have a box that tries to move from A to B. In order to avoid tunneling we need to check if there is a collision in the path described by its four corners.
Let's focus on the bottom-right corner of this example:
Tile size: 16
Bottom-right corner goes from (x:90, y: 42) to (x:75, y:85)
The most obvious algorithm is to check every single pixel of the hypotenuse colored in green; but this can be very slow if the distance is too big (note that we have to do this every single frame).
Is this a correct way to check collisions using tiles? If so, Is there a more efficient algorithm?