renatorib / otcts

👾 Open Tibia Client in TypeScript [WIP]
21 stars 1 forks source link

refactor map renderer logic #2

Open renatorib opened 3 years ago

renatorib commented 3 years ago

Today we just render all map items in top/left to bottom/right order.

We should care about: 1) Stackpos (grounds should render first than items, for example) 2) Understand how to handle sprites when creature move from bottom to top; Sprites from bottom should not overlap creature sprites while walking as its happening today (see img1 below) 3) Remove top floor visibility when things block your vision (see img2 below)

PS: Stackpos isn't a bug now because map editor already cares about it when save the otbm. So we read all in order and it's ok. But we should care about it too.

img1: walking_bug

img2: floor

renatorib commented 5 months ago

https://www.youtube.com/watch?v=2deCwZ5-3wM