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

Adventure map, optimize the hero's path, taking into account the destination reached on the next turn #8797

Open
1 task done
LeHerosInconnu opened this issue Jun 1, 2024 · 2 comments
Labels
improvement New feature, request or improvement

Comments

@LeHerosInconnu
Copy link

Preliminary checks

Describe the problem requiring a solution

In fheroes2, optimize the hero's path, taking into account the destination reached on the next turn.

In the example, the hero will reach the gems mine the following turn.
For the hero's path, for the current day (green arrows), we can see that the hero's last step is taken horizontally.
On the following turn, we can see that the hero will make a diagonal move to reach the gems mine (the last step to reach the brown cross).
If the proposed path is followed, the next turn the hero will have 1050 movement points left when he reaches the gems mine.
Now, if the path is optimized by making a diagonal move for the hero's last step, the hero will have 1100 movement points left when he reaches the gems mine.

In fheroes2:

Path optimize 01 001

Path optimize 01 002

Path optimize 01 003

Default path, 1050 movement points left.
Path optimize 01 004

Optimized path, 1100 movement points left.
Path optimize 01 005

Here is the save file:
Path optimize 01.zip

Describe the possible solution

Optimize the hero's path, taking into account the destination reached on the next turn.

Additional info

No response

@LeHerosInconnu LeHerosInconnu added the improvement New feature, request or improvement label Jun 1, 2024
@ihhub
Copy link
Owner

ihhub commented Jul 27, 2024

Hi @LeHerosInconnu , does the original game have this logic? If not let's not to micro-optimizations for the sake of a perfect gameplay.

@LeHerosInconnu
Copy link
Author

Hello @ihhub,

Hi @LeHerosInconnu , does the original game have this logic? If not let's not to micro-optimizations for the sake of a perfect gameplay.

I thought we wanted to make fheroes2 better than the original game.
The player would concentrate on the strategy to be deployed and enjoy the pleasure of playing, rather than being forced to optimize the movement of his heroes with each action to be performed and at the same time increasing the game time and manipulations required to achieve it (for example, splitting the hero's displacement instead of a single and simple action to be performed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature, request or improvement
Projects
None yet
Development

No branches or pull requests

2 participants