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.67k stars 373 forks source link

Adventure map, AI should use spacebar to re-visit objects #7139

Open Branikolog opened 1 year ago

Branikolog commented 1 year ago

Preliminary checks

Describe the problem requiring a solution

To visit stone liths, for instance, AI has to move and then return back, while human players can press spacebar.

Describe the possible solution

I think it would be fair, if AI hero can re-visit objects which he is standing on without wasting movement points or to not be stuck because of strong guardians near stone liths exit.

Additional info

No response

LeHerosInconnu commented 1 year ago

Hello @Branikolog,

I think it would be fair, if AI hero can re-visit objects which he is standing on without wasting movement points or to not be stuck because of strong guardians near stone liths exit.

I think the AI is going to freeze the game by using the stone liths in an endless movement loop... :D

Some scenarios in the original game are also based on the fact that the hero spends movement points to enter and exit stone liths. In fheroes2, this free and infinite movement (between stone liths of the same type) for long distances and multiple different destinations easily chosen is in contradiction with the original game. In the original game, it is not possible to choose the stone liths by which the hero will continue his travel without spending movement points by using multiple times stones liths of the same type. Using the space bar for stone liths should consume movement points.

Related discussion: https://github.com/ihhub/fheroes2/discussions/5625.

oleg-derevenetz commented 1 year ago

I think the AI is going to freeze the game by using the stone liths in an endless movement loop... :D

Yes, exactly. The main reason why this is not done (except that there is no such mechanism in the original game) is that the number of hero movement points serves as a "control mechanism" that prevents any kind of endless looping due to the (potential) imperfections of AI logic.

Branikolog commented 1 year ago

As a little offtop... I was always hating stone liths operation in HoMM games, which forces a player to jump multiple times to reach the specific exit. (And forced to reload, in a case hero appeared in blocked exit or lost creatures in whirlpool) I am about to suggest some day a new operating method of this object, where a player can select destination point. It could look alike to town portal window, where player can select a specific stone liths or choose some random (in a case he did not discovered all of exits). This would help to travel into target area without pressing space for several times. In the above particular map (Fortress isle) I could spend like a few minutes(!!) rolling for the exit I want which is inappropriate implementation in my opinion. As a penalty for such predictable behaviour a hero visiting stone liths could loose some movement points (let's say the same, DD or TP spells are consuming). In a case he could choose exactly the place, he wants to jump, it would be a reasonable payment for the teleportation.

ihhub commented 1 year ago

@Branikolog , "can select" logic was done in HoMM4 :)

Branikolog commented 1 year ago

@ihhub

@Branikolog , "can select" logic was done in HoMM4 :)

Oh, really? :) I need to check it. If I'm not mistaken, in h3 and h5 teleporters work the same to H2.

LeHerosInconnu commented 1 year ago

Hello @Branikolog, @oleg-derevenetz and @ihhub,

I'm not against this idea of paying a fixed cost (200 to 250 movement points, or the cost is twice the hero's move cost of the terrain type the starting stone liths is on, taking into account the hero's pathfinding secondary skill and related artifacts) and being able to choose the destination. Of course, the AI also chooses the destination with certainty to move its heroes. On the one hand, it will take away the suspense side of the trip, but it would also save some players from having to reload the game and it would avoid frustration and irritation for some others. :)

In the list of possible destinations, the stone liths already discovered are indicated, and if there are others which have not yet been discovered (for the same type) there is an entry which allows to randomly select one stone liths not yet discovered.

Also the stone liths should be renamed "Stargate", and there could also be an artifact that allows access to any stargate, the "Magic Dial-Home Device". :D

zenseii commented 1 year ago

The Alteris 2 map uses the randomness of stone liths as a gameplay aspect, and it is used to impede the arrival of a very strong AI. I know it's a fan made map, but it did get an official approval stamp by the original Heroes 2 designers when it was included in Heroes 2 Gold.

This is an example of how allowing to select the destination for stone liths will break already existing maps.

I will sound like a broken record, but my suggestion is a new portal-type object which lets you choose destination, thus preserving the original functioning of the stone liths.

LeHerosInconnu commented 1 year ago

Hello @zenseii,

The Alteris 2 map uses the randomness of stone liths as a gameplay aspect, and it is used to impede the arrival of a very strong AI. I know it's a fan made map, but it did get an official approval stamp by the original Heroes 2 designers when it was included in Heroes 2 Gold.

This is an example of how allowing to select the destination for stone liths will break already existing maps.

I will sound like a broken record, but my suggestion is a new portal-type object which lets you choose destination, thus preserving the original functioning of the stone liths.

I'm not too keen on introducing new types of teleporters. The original gameplay could be preserved by including a random destination in the list of all the available destinations. This could even be the default destination.

zenseii commented 1 year ago

Hello @zenseii,

The Alteris 2 map uses the randomness of stone liths as a gameplay aspect, and it is used to impede the arrival of a very strong AI. I know it's a fan made map, but it did get an official approval stamp by the original Heroes 2 designers when it was included in Heroes 2 Gold. This is an example of how allowing to select the destination for stone liths will break already existing maps. I will sound like a broken record, but my suggestion is a new portal-type object which lets you choose destination, thus preserving the original functioning of the stone liths.

I'm not too keen on introducing new types of teleporters. The original gameplay could be preserved by including a random destination in the list of all the available destinations. This could even be the default destination.

I don't see how making a default destination the random one would preserve how the AI is supposed to randomly travel around between the portals on the Alteris 2 map. If the player can choose the exact destination then the AI will too of course.

My opinion is that we need a new set of portals that people can decide to use in the new map editor, while the old maps with such "good portal design" using the random portal will be possible to experience just as they were designed for those who wish.

LeHerosInconnu commented 1 year ago

@zenseii.

Hello @zenseii,

The Alteris 2 map uses the randomness of stone liths as a gameplay aspect, and it is used to impede the arrival of a very strong AI. I know it's a fan made map, but it did get an official approval stamp by the original Heroes 2 designers when it was included in Heroes 2 Gold. This is an example of how allowing to select the destination for stone liths will break already existing maps. I will sound like a broken record, but my suggestion is a new portal-type object which lets you choose destination, thus preserving the original functioning of the stone liths.

I'm not too keen on introducing new types of teleporters. The original gameplay could be preserved by including a random destination in the list of all the available destinations. This could even be the default destination.

I don't see how making a default destination the random one would preserve how the AI is supposed to randomly travel around between the portals on the Alteris 2 map. If the player can choose the exact destination then the AI will too of course.

My opinion is that we need a new set of portals that people can decide to use in the new map editor, while the old maps with such "good portal design" using the random portal will be possible to experience just as they were designed for those who wish.

A rule can be applied for scenarios created with the original scenario editor, so that in these scenarios the destination of AI heroes is always random. For the human player, he can decide to play as originally, or prefer to choose the destination if it's more fun and/or less frustrating that way.

zenseii commented 11 months ago

Hi, @Branikolog, @LeHerosInconnu, @oleg-derevenetz and @ihhub.

It was pointed out to me by @Granfalegion, that another official map that came with the game utilized the random nature of liths and having to go away and back onto them, as a core design of the map. The map is called Portals.

As you can see in the picture, they deliberately placed random monsters near the liths, so going through a lith should be a calculated risk by the player: image

The description makes it very clear that being able to just hit the spacebar would ruin the design of the map: You can only reach your enemies via teleporters, but each jump is a leap of faith. It's not a very big leap of faith if you can just immediately leap away back into safety again.

I've made it quite clear already that I'm in favor of returning to the original functioning of liths and not being able to revisit them with the spacebar, but I know not everyone agrees on this. Hopefully this post can provide some more insight.

ihhub commented 11 months ago

I suggest to revisit this issue later. I noticed that we spotted quite a number issues in differences between the OG and fheroes2 and changing something back or modifying again would take resources. What if we have a table of features which are differently implemented in both applications with pros and cons there so then we could see what we could do and what we should do? A wiki page would work as well. Consider this as a mild suggestion, not as any sort of request for actions :)

oleg-derevenetz commented 11 months ago

Hi @zenseii

It was pointed out to me by @Granfalegion, that another official map that came with the game utilized the random nature of liths and having to go away and back onto them, as a core design of the map.

Although I also do not consider this feature vital (original game didn't have this feature, and I won't be upset if it has to be eventually removed), I should note that there are many maps that were made in the past according to the weaknesses (or maybe features) of the design of the original game. For instance, there are maps that are made in the expectation that AI does not know how to use certain spells (e.g. Summon Boat or Dimension Door). Such flawed maps by themselves should not be a reason for removing the new features from fheroes2.

Branikolog commented 11 months ago

I personally think that both implementations (original vs fheroes2) have pros and cons, but I suggest leaving modified fheroes2 interaction methods (with spacebar). Let me explain my thoughts. Inability to revisit stone liths in the original game happens mostly because of poor game-logic design and the particular mapmaker that placed guardians right near the exit. (for sure this could be made inventively, but such maps, I'm sure not balanced and will require save/load abuse). To evade the issue he could have made a short narrow corridor and place creatures in such way, so a hero could make step out of stone liths without triggering the battle and then come back. (No more stuck heroes) But such positioning has one disadvantage. If hero has Dimension Door spell (which appears in guilds quite often), he can access all liths on the map. If guardians are placed right near the stone liths it is not possible to teleport there and enter liths without a battle being triggered. So it definitely spoils/reduces the entire map logic.

At the same time placing guardians right near stone liths completely breaks the game since any player can enter the unknown liths and be stuck there, because of enormous guarding stack (which he couldn't be aware of). In 99% of single playthroughs it is resulted in reloading by human player. But AI cannot use that useful feature. (Hmm... @ihhub , I know your obsession about allowing AI to use the same features, players can, so what do you think about allowing AI to reload the game, if he's not satisfied with outcome? :D ) So AI tends to be stuck there forever, until someone could defeat guardians near the exit. But exit of stone liths could be located on a separate areas without any alternative access points. This may cause a completely map failure. So in conclusion we have a questionable object, where AI can be stuck forever, or human players tend to reload in majority of cases. 👎

So I expect teleporters system to be upgraded to get rid of those flaws I mention above (by changing the entire logic of existing objects or adding new objects with fixed logic, abandoning old stone liths objects).

The most safe solution is to allow revisiting stone liths object with spacebar. It changes a bit original logic but allows AI not to be stuck, human player not to reload instantly after he watched the guardians on the exit. But as I can see not everyone is satisfied with that approach. By the way, after reverting the ability of entering stone liths with spacebar, it would be not really intuitive, why any other object in game could be activated by using the space bar, but not the stone liths.

Another solution here is to allow hero interaction through stone liths: we can pass some forces to the stuck hero, so he can some day win the battle against guardians. Also, it helps taking away stuck enemy heroes from the exit by initiating a battle with them. But yet it is another change to original behaviour (which is another questionable implementation heavily abused by players, by blocking teleporters over the entire map) and will require a tricky logic for AI to be implemented.

What else could be implemented here? Maybe we can make a special dialog for the stone liths object, when a few separate pictures are introduced to a player (a tiny area around each potential stone liths exit (like 3x3 cells)), so player can watch what he is going to meet on exit, check the number of potential teleportation points and even check the number of troops near the exit. So a player can make a desicion whether he wants to enter teleporter or not. To make it fair for AI heroes - they should also know the exact number of guardians, so they jump into teleporter expecting the battle they can win. But still, allowing to use spacebar is much simplier here and brings the same results: heroes are no more stuck on exit and no more reloads from weak humans. With such implementation we can even get rid of those annoying jumping or reloading, when hero appears in a wrong exit (valid for all those AI jumps too, as we allow AI heroes to choose destination points). I find the original implementation absolutely inconvenient. It would be nice to be able to select the destination point. (I believe it could be a nice improvement over the original game regardless the decision on spacebar question.)

Granfalegion commented 11 months ago

I'll offer that creating narrow corridors out of liths is space-intensive, inelegant, and, under the original game design, thoroughly unnecessary. It doesn't make sense to punish original maps because they obeyed the rules of how the liths actually worked.

I'd challenge your assertions that this is fundamentally poor or flawed design. Finding out that a lith leads you to a bad situation -- even if you decide to reload because of it! -- can be a good thing for design. It's an opportunity for surprise. It's an opportunity to dread going through because who knows what's on the other side? The premise that a situation where players have to reload after making a choice is inherently a waste of their time or a bad experience is not a strong one. The game is about exploration and decision-making. Players will make many bad choices and choose to reload after. That's not an inherent frustration.

Perhaps it would be useful to explore a bit about why it's useful to interact with squares that you're standing on without needing to move. I struggle to see what situations a human player would meaningfully benefit from doing that with the exception of hiring sleeper heroes to sit on top of windmills and never leave them. That's a paltry gain for something that can break whole maps.

Branikolog commented 11 months ago

Hello, @Granfalegion !

Finding out that a lith leads you to a bad situation -- even if you decide to reload because of it! -- can be a good thing for design. It's an opportunity for surprise. It's an opportunity to dread going through because who knows what's on the other side? The premise that a situation where players have to reload after making a choice is inherently a waste of their time or a bad experience is not a strong one. The game is about exploration and decision-making. Players will make many bad choices and choose to reload after. That's not an inherent frustration.

Let's imagine one situation: you enter a stone liths with your strong and only hero full of artifacts, skilled and armed. After appearing somewhere on distant area, right near the exit you see dozens of black dragons. You cannot dismiss your hero, as it completely disappears. You cannot attack Dragons, as they have the faster speed and they demolish all your forces before you can can flee. The map is failed. Let's say a few hours of playing are going to be finished with such a disappointment. What would you do in such situation? 100% it's rage reload case. 😅 Indeed, some maps could be designed in such straight-exploring way with a hero with a predefined starting forces. All stone liths guardians could be placed considering the starting hero army. So player always know, that after always can win while wandering over the liths. But the majority of maps are not designed in such way, so players literally never know what to expect and can loose the whole game just because of "surprise" on the other side of stone liths. I'm still convinced, it's just a bad design, when you have such risks to loose the game just because the outcome of the action you make is totally unpredictable. It's like a hidden cell on a battlefield, which causes your hero automatically loose, if any of creatures accidentally stand on it. Some micromanagement can also be used here and you could send empty hero into a teleporter. But when the game forces you to do such actions - it's definitely a bad design too. Micromanagement should be an unforced action, leaving player a choice, while stone liths are inclining players to do such unnecessary actions, like reloading or sacrificing heroes.

Granfalegion commented 11 months ago

It's a probable reload. If you read what I have been saying though, I disagree that that's inherently bad or that the player is necessarily upset. It's fine if your position is that it isn't fun for you. It's a mistake to say that that is universally true.

zenseii commented 11 months ago

Hi, @Branikolog. I agree that in such a map any player would rage quit or just reload, but we have to ask the question about what or who is really to blame here - The game, or the map designer?

What if I design a map that after day 15 an army of legions of titans shows up and kills everyone and you can't escape it, is that bad core design of Heroes 2 because it allowed me to create such a rage-inducing map, or am I, the map creator, to blame for my horrible design? This is my point. All Heroes 2 map designers should know how stone liths work when they design their maps, and we shouldn't be trying to "fix" the maps for them. To me that's like writing code that removes such a killer army of titans from showing up in such maps just because it made us mad when we played them - My proposal is in such cases to just avoid playing those maps ever again and not recommend them to others.

There are always going to be badly designed maps, and trying to make fheroes2 into something that makes them less bad is in my opinion the wrong approach. Let them be bad and give them a 1-star rating on whatever site you found them on, preferrably with an angry emote 😡

Branikolog commented 11 months ago

Hi, @Granfalegion I apologize, if my answer seemed too peremptory for you.

Perhaps I am being too conservative in this regard, but I believe a game should be created in such a way, not to force a player to reload, unless he made a fatal mistake in his tactics and strategy. The original behaviour of the game regarding stone liths makes players feel discomfort, while using it. In the majority of cases player needs to use teleporters, as maps often imply using teleporters as the only mean of reaching certain areas, but the outcome is completely unpredictable. If you play the map several times, you already know, what to expect on the exit without any surprises. So no intrigue at all, since player won't even use teleporter, unless he hires lots of troops, remembering the number of guardians on exit. So what's the fun making a player jump into stone liths and reload again for the first time he plays the map?

I simply want to bring some transparency to this aspect. On the contrary, what we are going to sacrifice in a case spacebar will continued to be used for stone liths interaction by human (and allowed for AI player too)? Hero can enter -> be surprised by the guardians on exit -> and then jump back, instead of reloading to perform the same result. This also helps avoiding AI hero be stuck on the exit, which makes the map unplayable at all (which is a definitely a huge problem).

Good or bad designed map - spacebar logic brings benefits for both of them. Majority of players (from later games of the Heroes series) got used to such interaction methods and I only heard complains about why do AI doesn't use spacebar to jump back, rather, why do player is capable of making jump back, while in the OG it was not possible at all.