Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Castle screen, active area of the swordmen's dwelling encroaches on the active area of the mage guild #9366

Open
2 tasks done
LeHerosInconnu opened this issue Dec 22, 2024 · 3 comments
Labels
bug Something doesn't work low priority Low priority item which could be addressed in the future ui UI/GUI related stuff

Comments

@LeHerosInconnu
Copy link

Preliminary checks

Platform

Windows

Describe the bug

In fheroes2, the active area of the swordmen's dwelling encroaches on the active area of the mage guild.

In fheroes2:

2024-12-22.16-47-14.mp4

Save file

Here is the save file:
Swordman dwelling over mage guild 01.zip

Additional info

No response

@LeHerosInconnu LeHerosInconnu added the bug Something doesn't work label Dec 22, 2024
@oleg-derevenetz oleg-derevenetz added ui UI/GUI related stuff low priority Low priority item which could be addressed in the future labels Dec 22, 2024
@oleg-derevenetz oleg-derevenetz added this to the Beyond OG scope milestone Dec 22, 2024
@oleg-derevenetz
Copy link
Collaborator

As far as I understand, this cosmetic issue is caused by the fact that the active zones of castle buildings are rectangles, and this particular dwelling has a more complex shape. Its active zone rectangle is currently oriented in height to the highest point of its roof. Of course, height of the active zone can be reduced, but then it will not capture the upper part of the dwelling's roof.

@LeHerosInconnu
Copy link
Author

Question:
Wouldn't it be possible to automatically determine the active area based on the non-transparent pixels of each building's sprite?
The transparent pixels inside the area defined by the pixels forming the edge of the area would be added to the area to form a regular area (without holes).

@oleg-derevenetz
Copy link
Collaborator

Wouldn't it be possible to automatically determine the active area based on the non-transparent pixels of each building's sprite?
The transparent pixels inside the area defined by the pixels forming the edge of the area would be added to the area to form a regular area (without holes).

I'm not an expert on castle rendering, but in my opinion there will be separate problems with this approach, because building sprites are often not only the buildings themselves, but also various connections (roads, bridges, and so on) which may be quite far from the building itself (for instance, AFAIK, this is the case for the Den dwelling in the Barbarian castle). You must admit that it would be strange to click on a section of road and enter a building instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something doesn't work low priority Low priority item which could be addressed in the future ui UI/GUI related stuff
Projects
None yet
Development

No branches or pull requests

2 participants