ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.57k stars 360 forks source link

Polish rendering on Adventure Map #5716

Open ihhub opened 1 year ago

ihhub commented 1 year ago

Preliminary checks

Describe the problem requiring a solution

After merging #5692 we still have multiple tasks to be done in order to polish rendering on Adventure Map:

Good to have:

All issues related to rendering on Adventure Map should be reported here to make them easier to track.

Describe the possible solution

Fix everything.

Additional info

No response

Branikolog commented 1 year ago

An issue with wide tree: image image Tree.zip

ihhub commented 1 year ago

Hi @Branikolog , I think it works exactly the same way as in the original game due to object info.

oleg-derevenetz commented 1 year ago

It seems that Mine guards are no longer drawn (map "Skirmish"):

Screenshot1 Screenshot2
ihhub commented 1 year ago

Oh, no. I will fix it.

Branikolog commented 1 year ago

Hi @Branikolog , I think it works exactly the same way as in the original game due to object info.

Hi, @ihhub ! I suppose you're right. But nevertheless this bug should be fixed. ;)

Branikolog commented 1 year ago

{SOLVED} AI hero priority rendering bug: image Decisions_Hero bug.zip

Edit: Fixed by #5787

Branikolog commented 1 year ago

Hi, @ihhub I've noticed that AI hero sprite is partially visible through mountains while moving. image Horse tail.zip

Branikolog commented 1 year ago

{SOLVED} One more issue: Alchemist lab flag appears only when the roof is visible on the screen: image image

ihhub commented 1 year ago

Hi, @ihhub I've noticed that AI hero sprite is partially visible through mountains while moving.

Are you testing the latest version with my fix for AI heroes? If yes is it the same for player's heroes?

Branikolog commented 1 year ago

Are you testing the latest version with my fix for AI heroes? If yes is it the same for player's heroes?

Sorry, my little mistake: human heroes experience the same bug. I'm testing on the latest build of course. ;) Horse tail is visible through mountains for both human and AI heroes. I thought this bug was fixed recently... I must be wrong...

Branikolog commented 1 year ago

Oasis has an issue with a hero moving downwards. 198876878-b1dafec4-04a8-4c1c-a280-6d318cfcf12c Broken_Allian1.zip

LeHerosInconnu commented 1 year ago

The hero's shadow is added to the Water Wheel's shadow, making part of the shadow darker.

In fheroes2:

Shadows merge 01

Here is the save file: Shadows merge 01.zip

LeHerosInconnu commented 1 year ago

Some objects project a shadow on the hero as he moves.

In fheroes2:

https://user-images.githubusercontent.com/43583994/200311878-681206cb-9d0b-4cf4-93e8-ca506a65c492.mp4

Here is the save file: Shadow over hero 10.zip

Edit.

Other saves for this: Shadow over hero 10.zip

In fheroes2:

https://user-images.githubusercontent.com/43583994/200318834-aa8a6127-b057-4a70-abfd-53049e3842d8.mp4

https://user-images.githubusercontent.com/43583994/200318640-e1fd296f-290b-477e-abc2-352a71ca3c19.mp4

Branikolog commented 1 year ago

A part of hero sprite is still visible through obstacles on the adventure map.

https://user-images.githubusercontent.com/55348946/206858575-8bfb5f7a-cf62-46fb-8d36-b7eb7c70b916.mp4

Branikolog commented 1 year ago

One more case:

image

image

Unicorn tail.zip

Branikolog commented 1 year ago

One more issue with hero flag while going out of the castle: Cut flag

Branikolog commented 1 year ago

{SOLVED} Shadow is partly rendered over a boat sailing diagonally:

https://user-images.githubusercontent.com/55348946/221403910-18b7863b-3c40-45f2-aa2a-092b6f95305d.mp4

Districh-ru commented 1 year ago

{SOLVED} Hero shadow is not properly updated during move when hero speed is set to 10: fheroes2 2023-03-13 15-20-42-634 fheroes2 2023-03-13 16-05-08-805

Edit: Fixed by #6831

LeHerosInconnu commented 1 year ago

The bottom of the hero sprite is cut on the road.

In fheroes2:

Hero bottom sprite cut on road 01

Here is the save file (1.0.2 6820): Hero cut on road 01.zip

Districh-ru commented 1 year ago

The bottom of the hero sprite is cut on the road.

In this case the layer type for the Road is set to "Object layer". On the nearby tiles the Road layer type is "Terrain layer".

--------- Level 1 --------
UID             : 5318
ICN object type : 30 (ROAD.ICN)
image index     : 1
layer type      : 0 (0) - Object layer
is shadow       : no
--- Extra information ---

Maybe we should correct such cases on map load. Hi, @ihhub, what do you think?

Update: The original map does not have such issue. It happens on monster spawn at the start of the month. Initially this tile was:

******* Tile info *******
Tile index      : 14878, point: (46, 103)
UID             : 5318
MP2 object type : 0
ICN object type : 30 (ROAD.ICN)
image index     : 1 (animated: 0)
layer type      : 3 - Terrain layer

Edit: Fixed by https://github.com/ihhub/fheroes2/pull/6858

Branikolog commented 1 year ago

image One more priority rendering bug which is present in the OG too. THUNK_crack.zip

Districh-ru commented 1 year ago

One more priority rendering bug which is present in the OG too. THUNK_crack.zip

It is probably a bug of original editor: ~when there is a Road or a Stream~ it can put some Shadow layer objects to the 2nd layer which are rendered after the render of heroes:

``` ******* Tile info ******* Tile index : 3342, point: (102, 30) UID : 1835 MP2 object type : 108 (Crater) ICN object type : 31 (MTNCRCK.ICN) image index : 0 (animated: 0) layer type : 2 - Shadow layer region : 22 ground : Wasteland (isRoad: 1) shadow : true passable from : center, top, top-right, right, bottom-right, bottom, bottom-left, left --------- Level 1 -------- UID : 1906 ICN object type : 30 (ROAD.ICN) image index : 18 layer type : 3 (3) - Terrain layer is shadow : no --------- Level 2 -------- UID : 5596 ICN object type : 57 (OBJNCRCK.ICN) image index : 226 layer type : 2 (2) - Shadow layer is shadow : no --- Extra information --- ************************* ```

The issue is the same as in https://github.com/ihhub/fheroes2/issues/5716#issuecomment-1220622843 (Updated save file: Tree.zip )

And the left part of the Tree has the same issue as the right one: fheroes2 2023-04-01 19-27-40-037

```******* Tile info ******* Tile index : 5491, point: (19, 38) UID : 0 MP2 object type : 99 (Trees) ICN object type : 0 (UNKNOWN) image index : 255 (animated: 0) layer type : 0 - Object layer region : 16 ground : Dirt (isRoad: 0) shadow : false passable from : center, top, right, bottom-right, bottom, bottom-left, left, top-left quantity 1 : 0 quantity 2 : 0 add. metadata : 0 --------- Level 2 -------- UID : 11996 ICN object type : 56 (OBJNDIRT.ICN) image index : 122 layer type : 0 (0) - Object layer is shadow : no --- Extra information --- ************************* ```
LeHerosInconnu commented 1 year ago

The red AI player's hero is displayed over the top of the Necromancer's castle.

In fheroes2:

AI hero over top castle 01

Here is the save file (1.0.5 7020): AI hero over top castle 01.zip

LeHerosInconnu commented 1 year ago

Graphic problem with boat near sirens.

In fheroes2:

https://github.com/ihhub/fheroes2/assets/43583994/c377a176-690e-4a0e-9b21-0ef77664552b

Here is the save file (1.0.5 7020): Hero path near sirens 01.zip

LeHerosInconnu commented 1 year ago

The blue player's hero is displayed over the top of the water wheel.

In fheroes2:

Hero over water wheel 01

Here is the save file (1.0.5 7020): Hero over water wheel 01.zip

LeHerosInconnu commented 1 year ago

The blue player's hero is displayed over the top of the castle.

In fheroes2:

Hero over top castle 02

Here is the save file (1.0.5 7308): Hero over top castle 02.zip

LeHerosInconnu commented 1 year ago

The shadow of the tree is displayed over the hero Crack Hack.

In fheroes2:

Tree shadow 01

Here is the save file (1.0.5 7308): Tree shadow 01.zip

Districh-ru commented 1 year ago

The right part of the Abandoned mine is not updated after the capture (bug found by apocalypse on Discord):

изображение

Save file: ghostmine_capture_sprit_bug.zip

Edit: Fixed by #7351

LeHerosInconnu commented 9 months ago

A more recent save file for this. The horse's head is hidden by a tree.

In fheroes2:

Hero sprite cut 1000

Here is the save file (1.0.8 7767): Hero sprite cut 1000.zip

LeHerosInconnu commented 8 months ago

Another save file for this.

In fheroes2:

vlcsnap-2023-10-08-14h08m13s499

https://github.com/ihhub/fheroes2/assets/43583994/93413ad1-e619-4227-8ed3-376b52e8584e

Here is the save file (1.0.8 7846): Before hero crackland 01.zip

LeHerosInconnu commented 4 months ago

There's a priority problem between the ghost animation display, the hero flag sprite, and the hero sprite.

In fheroes2:

https://github.com/ihhub/fheroes2/assets/43583994/5e4c47c5-1ccd-4f48-ae03-ee1e034f84c4

vlcsnap-2024-02-15-13h38m40s792

Here is the save file (1.0.12 8369): Priorite ghost display 01.zip

LeHerosInconnu commented 4 months ago

Display priority problem between boat and sirens.

In fheroes2:

vlcsnap-2024-02-21-14h33m49s388

https://github.com/ihhub/fheroes2/assets/43583994/e790e6d9-e61f-4ed9-808f-dc192af51819

Here is the save file (1.0.12 8369): Ai sirens graphic glitch 01.zip

LeHerosInconnu commented 3 weeks ago

Display priority problem between hero and stables.

In fheroes2:

vlcsnap-2024-06-01-21h35m48s290

https://github.com/ihhub/fheroes2/assets/43583994/6aba2982-fe88-47fd-b5b8-379ee67c10ac

Here is the save file (1.1.0 8733): Display priority stables 01.zip