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.69k stars 375 forks source link

Adventure map, passability test #4495

Open LeHerosInconnu opened 2 years ago

LeHerosInconnu commented 2 years ago

Preliminary checks

Platform

Windows

Describe the bug

Hello @ihhub,

So, I finished my big (and boring) test on passability without any object adjacency. There are still many differences, here some examples:

Sawmills. Passability test 015 Passability test 016 Passability test 017 Passability test 018 Passability 02 013 Passability 02 014 Passability 02 015 Passability 02 016 Passability 02 069 Passability 02 070

Water Lake. Passability 02 045 Passability 02 046 Passability 02 047 Note that I had a problem while switching between the original game and fheroes2, the screen is a bit blurred and thus displayed in a different color, I didn't manage to reproduce this flaw. Passability 02 048

There is also a difference of operating to activate the event of certain objects (https://github.com/ihhub/fheroes2/issues/4508).

In original game: For Shipwreck and Magellan's Maps, the hero move on the active square of the object to activate the event. And for Derelict Ship, Mermaid and Sirens, the hero don't move over the active square of the object to activate the event.

In fheroes2: For Shipwreck, the hero don't move over the active square of the object to activate the event. And for Derelict Ship, Mermaid, Sirens and Magellan's Maps, the hero move on the active square of the object to activate the event.

Tell me if you want me to open one or more issues for these differences.

There are also differences in passability with the Shipwreck and Derelict Ship. And in the case of the Shipwreck, there is a difference in passability in the original game depending on the presence or absence of terrain south of the Shipwreck position. I think that in the case of the Shipwreck and the presence of terrain south of the position it may be a question of a bug in the original game.

In original game: Passability test 069 Passability test 106

Also, I think that all the squares of the Shipwreck and the Derelict Ship should remain accessible as it is currently the case in fheroes2, it is much more natural and it does not change at all the way to play compared to the original game.

In fheroes2: Passability test 066 Passability test 070

There are also differences between the predetermined path of the hero, but these are not related to passability. I will open another issue to optimize the predetermined path of the hero (https://github.com/ihhub/fheroes2/issues/4510).

Passability test 001 Passability test 002

There are also differences with the way Whirlpools work (https://github.com/ihhub/fheroes2/issues/4509). Related discussions: https://github.com/ihhub/fheroes2/discussions/3565, https://github.com/ihhub/fheroes2/discussions/3563 and https://github.com/ihhub/fheroes2/discussions/3562.

Passability test 071 Passability test 072

For the Jail, the hero passes through the Jail when he moves. This bug is also present in the original game. I think this can be fixed with the passability. Tell me if you want me to open one separate issue for this.

vlcsnap-2021-10-25-14h57m56s078

https://user-images.githubusercontent.com/43583994/138717630-d651adf6-8448-4d20-a241-6b6fc7e80e65.mp4

Some objects don't have passability, but it's the same in the original game (the case of the Jail is mentioned above). I think they can stay that way (except for the Jail).

Passability 02 053 Passability 02 054 Passability 02 081

For me it's also okay (and preferable) that the Jail can be opened when the hero is located in the square directly north. In the original game, the hero first moves east to open the Jail, which doesn't make much sense. :D

Passability test 025 Passability test 026

Now I just have to test all the possibilities with adjacency, see you in 10 years. :D And then the passability with the Dimension Door spell, count another 10 years for that. :D :D Note that this is a joke, I have no intention of doing this. :)

For passibility with the Dimension Door spell, a simple rule should be applied. If the hero can move on a square on horseback, then he can also move on this square with the Dimension Door spell except for the interactive square(s) of the object (even for squares where the hero's path on horseback is blocked by another object(s) but which would be accessible if not blocked).

Here are all screenshots for passibility and predefined path differences: https://drive.google.com/file/d/12eG_uOTrI7wSsnGJBagfvu8AGQ-qxAD0/view?usp=sharing

Save file

Here are the test scenario and the save files: Passability test scenarios and saves.zip

Additional info

No response

ihhub commented 2 years ago

Hi @LeHerosInconnu , please check the latest version as I recently fixed many cases with diagonal moves. I think it was yesterday :)

ihhub commented 2 years ago

@LeHerosInconnu , anyway, thanks a lot for your testing and findings! Most of issues are still present. I'll take a look and fix as many as possible.

LeHerosInconnu commented 2 years ago

Hello @ihhub,

So there is no need to open other issues for the other cases presented?

ihhub commented 2 years ago

Hi @LeHerosInconnu , give me please some time to analyse your findings. I'll let you know soon.

ihhub commented 2 years ago

@LeHerosInconnu , please create separate issue for Derelict Ship, Mermaids and Shipwreck interaction (moving or not moving onto a cell). This will be manageable to fix in this release. Also create an issue about path creation. I think we need to create path based on a direction if both paths have the same value / length.

Some passability issues are fixed but some aren't as you noticed. I'll fix Reefs behavior, I think these objects are considered as a part of action objects, which is wrong.

Also please create a separate issue for Whirlpools. The logic is incorrect, we shouldn't allow to move like this.

LeHerosInconnu commented 2 years ago

@ihhub.

@LeHerosInconnu , please create separate issue for Derelict Ship, Mermaids and Shipwreck interaction (moving or not moving onto a cell). This will be manageable to fix in this release. Also create an issue about path creation. I think we need to create path based on a direction if both paths have the same value / length.

Some passability issues are fixed but some aren't as you noticed. I'll fix Reefs behavior, I think these objects are considered as a part of action objects, which is wrong.

Also please create a separate issue for Whirlpools. The logic is incorrect, we shouldn't allow to move like this.

Okay, I'll do this tomorrow.

LeHerosInconnu commented 2 years ago

Hello @ihhub,

@ihhub.

@LeHerosInconnu , please create separate issue for Derelict Ship, Mermaids and Shipwreck interaction (moving or not moving onto a cell). This will be manageable to fix in this release. Also create an issue about path creation. I think we need to create path based on a direction if both paths have the same value / length. Some passability issues are fixed but some aren't as you noticed. I'll fix Reefs behavior, I think these objects are considered as a part of action objects, which is wrong. Also please create a separate issue for Whirlpools. The logic is incorrect, we shouldn't allow to move like this.

Okay, I'll do this tomorrow.

All done.

ihhub commented 2 years ago

@LeHerosInconnu , thank you very much for this!

Reefs passabilities are fixed :)

Branikolog commented 2 years ago

OG: image fheroes2: image Pass.zip

ihhub commented 2 years ago

The case described by @Branikolog is fixed. The only passability issue is left with Sawmill.

Branikolog commented 2 years ago

Sawmill in the OG while enemy hero is visiting it: sawmill

LeHerosInconnu commented 2 years ago

Hello @Branikolog,

Sawmill in the OG while enemy hero is visiting it: sawmill

This is a bug in the original game that affects many objects and which should be fixed in fheroes2. :) Link to some examples: https://heroes2.forumactif.com/t862-heroes-2-bugs-heroes-interaction-through-objects

Branikolog commented 2 years ago

Hi, @LeHerosInconnu ! Thanks for the info. I've posted it here, because this can help our devs to fix current passability problems.

Branikolog commented 2 years ago

Fheroes2: image OG: image Mines.zip

Branikolog commented 2 years ago

One more object with wrong passability. OG: image fheroes2: image

ihhub commented 2 years ago

One more object with wrong passability. OG: image fheroes2: image

Hi @Branikolog , I tested it on a new map and this object has correct passability.

Branikolog commented 2 years ago

Hello, @ihhub I've investigated the problem. The issue happens on a particular map (Terrain wars) where this object (Sirens) has different passability (for both original game and fheroes2). OG: image I don't know, how it happened and should we fix it. But, nevertheless, there're differences in passabilities in the OG and fheroes2 regarding this object. fheroes2: image

ihhub commented 2 years ago

No, we shouldn't fix obvious hacked map format.

Branikolog commented 2 years ago

No, we shouldn't fix obvious hacked map format.

Okay. But nevertheless fheroes2 works differently, comparing to the OG regarding this place. Could you, please, investigate whether these differences could cause some other problems in future?

zenseii commented 1 year ago

During a stream I noticed this seemingly passability problem where the road between the gazebo and the rock is blocked and you can see that the route is planned around them: image

https://www.youtube.com/live/uoNoRWF6Ock?feature=share&t=4091

The map is an external one called Former Rivals but I don't have it to test on.

LeHerosInconnu commented 1 year ago

I don't have this scenario either.