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

When units overlap with large buildings, they can only be displayed completely in front of it or completely behind it #2814

Open
jmdejong opened this Issue May 6, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@jmdejong
Contributor

jmdejong commented May 6, 2018

When two images overlap, one always has to be shown in front, and the other one behind it.
Currently, when two images are in the same layer, it is decided by the position of the origin which is placed in front.
This works quite well when the images are small, for example with people and trees, but starts to look weird with larger images, like people on marketplaces.
villagers_on_roof villagers walking on rooftop
villager_under_ground villager hidden under ground tiles
Villagers that are below (on the screen) the center of the marketplace are always shown in front of the marketplace, and if they are above it they are always shown behind it.

This is basically a consequence of using a singe image and origin for the large object.

As far as I know there would be 2 ways to fix it:

  • Using multiple images for large buildings. This would require some changes in the building/worldobject code and it would require all buildings to be rendered again in separate parts
  • Using texture heightmaps. This can allow for pixel perfect collisions, and would probably look best. This would require some low-level opengl changes in FIFE though. Also, this would require rendering a heightmap of all (decently large) objects.
@LinuxDonald

This comment has been minimized.

Member

LinuxDonald commented May 7, 2018

I like the second one. But i dont know. I helios will do this..

@jmdejong

This comment has been minimized.

Contributor

jmdejong commented May 7, 2018

I made the suggestion in FIFE: fifengine/fifengine#1058
I tried to explain it a bit better there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment