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

[Vita] Space button #4212

Closed Kiiro-Yakumo closed 2 years ago

Kiiro-Yakumo commented 3 years ago

Preliminary checks

Describe the problem requiring a solution

The space button as probably everyone know makes the hero re-visit the field he or she stands on as if arriving there without moving away. On PC it's easy to do so with said space button. Vita doesn't have this feature as far as I know but would provide useful in many situations on the map.

Describe the possible solution

Since most of the possible buttons are taken there is little left to use. In case of PS Vita it could be back touch area, any of it or specific part. In case of PS TV which technically lacks such back touch area it could be L3 and/or R3 on the connected PS4 Gamepad.

Additional info

Taking lesson from other projects I guess an additional option in the config file to enable/disable back touch area could prove useful for those who have problems with holding PS Vita or for whatever other reason.

vincent-grosbois commented 3 years ago

Do we have the "space button" in H2 ? I thought it was a H3 thing

Kiiro-Yakumo commented 3 years ago

We do in both, it comes handy especially in situations where you have a big map with one type of portal multiplied and you don't want to constantly make a move back and forth to just pass through the portal. It works in both Heroes 2, Heroes 3 and probably in Heroes 4 as well.

oleg-derevenetz commented 3 years ago

@vincent-grosbois in original HoMM2 space button is not really supported, but in fheroes2 it is (as an UI enhancement).

vincent-grosbois commented 3 years ago

BTW was it really thought out, what are the gameplay changes of allowing this? Because there are a few maps where you have a monoliths that leads to lots of different other liths, and it makes the game much easier if you can press space until you find the correct lith exit, without spending move points. Also if it's the same for AI, it can lead to some gameplay changes by the AI.

For instance, there is a map in POL campaign where the enemy has 3 liths on the deserts in his zone, and it's connected to 1 lith in the player's zone. Because the enemy starts in the desert zone, he has only 1 chance out of 3 to reach the player zone when taking a lith, and because the terrain is desert it's quite hard to retry. However with the new change, the AI can reach the player's lith exit on the first try

oleg-derevenetz commented 3 years ago

@vincent-grosbois only the liths of the same type (having the same sprite) are interconnected, so if those 3 liths in that map have different sprites, there is no way to teleport to the endpoint of the another lith using space button. Anyway, I doubt that this space bar mechanics will be reverted, it's just too handy. AFAIK AI is currently too stupid to use it :)

Branikolog commented 3 years ago

Hi, @vincent-grosbois ! On one hand you're right. With "space" option anyone (both hero and AI) can jump until he reaches needed area. But on the other hand. You've talked about a chance (1 of 3). So the map was created assuming that AI COULD jump to player's area in 33.3% of cases (or smth like that). What are you suppose to do in that cases? Restart the map? I don't think that map was created in a way to make player restart each time AI jumps into his area... So... You should be ready to meet him. Also, in this situation we allow AI decide what area he wants to invade.

vincent-grosbois commented 3 years ago

@vincent-grosbois only the liths of the same type (having the same sprite) are interconnected, so if those 3 liths in that map have different sprites, there is no way to teleport to the endpoint of the another lith using space button. Anyway, I doubt that this space bar mechanics will be reverted, it's just too handy. AFAIK AI is currently too stupid to use it :)

I think in that map (I think it's descendants campaign), there 4 liths have different sprites. Does it mean they can't connect to each other in fheroes2 ? if so it's a bug

Branikolog commented 3 years ago

@vincent-grosbois only the liths of the same type (having the same sprite) are interconnected, so if those 3 liths in that map have different sprites, there is no way to teleport to the endpoint of the another lith using space button. Anyway, I doubt that this space bar mechanics will be reverted, it's just too handy. AFAIK AI is currently too stupid to use it :)

I think in that map (I think it's descendants campaign), there 4 liths have different sprites. Does it mean they can't connect to each other in fheroes2 ? if so it's a bug

We cannot jump between liths with different sprites. You even cannot create a map with only two liths with different sprites: editor will show you a warning, that some liths don't have destination places.

oleg-derevenetz commented 3 years ago

@vincent-grosbois

I think in that map (I think it's descendants campaign), there 4 liths have different sprites. Does it mean they can't connect to each other in fheroes2 ? if so it's a bug

I didn't see that map (and I'm not sure that this is a bug either), but the current logic in the World::GetTeleportEndPoints() tells us that only liths with the same sprite are interconnected.

vincent-grosbois commented 3 years ago

it's that map : https://youtu.be/AQNKqxfBQM4?t=532 My bad, I think it's 4 times the same liths. But I think my point still applies about the fact that it's intended to be "easy" to get to the enemy side from the player's side, but the opposite is not true.

Kiiro-Yakumo commented 3 years ago

May I remind that on PC version we can use space button and AI still doesn't "use" it? :P The ability for player to use something and for AI to use the same thing are two different bags of tricks in terms of coding. Also it won't break the game because you STILL use the movement points, it's not magically giving you opportunity to keep trying for whole day unless you land in that one out of X gateway on your first turn.

@oleg-derevenetz - Oh? I thought the original Heroes 2 had space button as well. My bad then.

If it's okay to call the map names then my main argument revolved around the "Fortress Isle" map where player and his or her allies have about 8... no, more than 8 gateways of the same type so moving around takes huge ammounts of time being wasted on going back and forth, add to it difficult terrain which eats your movement points like an ever hungry dragon and your motivation goes down fast. Oh did I mention that on this map you have no mines nearby and closest one is just wood and stone IF you can randomize yourself to it? :P

a1exsh commented 3 years ago

Correct, the original game does not allow using portals without moving one cell away and back.

At the same time, we do not recreate the original game 1:1 — where we can improve, we should, IMO, for example, by making this possibility optional/configurable.

Kiiro-Yakumo commented 3 years ago

Yup, the ON/OFF for this option is simple way to diplomacy because if someone will want to have the "feel" of original game which, as was established didn't have that option and secondly for those who are accidentally touching back touch area. Then again, I think the game checks if the field we are standing on can be re-visited so we shouldn't have much cases of accidental movement usage.

ihhub commented 3 years ago

We shouldn't add extra options to cover such cases. Hi @Northfear , could you please express your opinion about this issue?

Northfear commented 3 years ago

Adding "SPACE" action to the gamepad shouldn't be a problem. Not a fan of back touch in general plus Switch doesn't have one, but we could use D-Pad button instead, since right analog stick is used for map scrolling now (and I had no idea how to use DPad instead).

As for the functionality, I think it's pretty harmless. I mean fheroes2 is at version 0.9.7 currently and I guess this is the first time someone brought that up. No point of removing it if there was no harm from it up to this point (especially if AI is not using it to break balance with existing maps). Balance and improvements can be a touchy topic in general. I mean look at AI. Does it change the original game balance by being smarter? Absolutely. Is it a bad thing? Hell no!

Kiiro-Yakumo commented 2 years ago

Sorry for the late reply, it slipped past me there are replies in this manner.

If scrolling was moved from D-Pad to the right stick then by all means there are 4 buttons free to be used for stuff. Since the "SPACE" button is basically visitting the same tile, ground then maybe D-Pad Down could be assigned for this?

As for the other buttons I guess that's a topic for another day - and "issue" entry? - but I will try to think about something.

Balance and improvements can be a touchy topic in general. I mean look at AI. Does it change the original game balance by being smarter? Absolutely. Is it a bad thing? Hell no!

[Cough] Heroes 3, Firewall, Pixie [Cough] But yeah, sometimes AI in Heroes 2 and 3 was so silly it was almost a crime to exploit it, so improvements in that area are all good things. If only certain other series got so much love from good coders...