wheybags/freeablo

Clipping issues

Opened this issue · 2 comments

Parts of the player's sprites can be seen through a wall:

image

This is a hard one to solve, the problem stems from walls and floors being on the same tile. This makes it close to impossible to draw the tiles in an order that doesn't cause issues like this. The original game checked if you were moving in a diagonal and if that was the case it would redraw the tile you were moving in to. But this actually created new issues where it could draw on top of sprites on the other side of the wall.

DIABLO_20190428_063210

In the following video, you can see how the original render first renders the hero sticking through the wall, and then tries to cover it up but renders on top of the bookcase when doing do.
https://youtu.be/9JN_8shuKy0

Additionally, this also means that true transparency cannot be used since this method results in the same transparent tile being rendered multiple times.

p.s. the movement tracking fails when actors make sharp turns at walls, this can easily be done as you pass by Farnham's house: https://youtu.be/smZgepWpEA0