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

Update Hero Movement button #9085

Merged

Conversation

AlexSnowLeo
Copy link
Contributor

@AlexSnowLeo AlexSnowLeo commented Sep 5, 2024

Close this issue: #8924
Fixed check on Hero Movement button to delete hero path always regardless of the button status.

to delete hero path always
@oleg-derevenetz
Copy link
Collaborator

Despite the fact that it technically works, it doesn't look very elegant. First of all, this button is disabled, that is, from the user's point of view, it cannot be pressed. Also, since it is disabled, there is no press and release animation.

@AlexSnowLeo
Copy link
Contributor Author

Despite the fact that it technically works, it doesn't look very elegant. First of all, this button is disabled, that is, from the user's point of view, it cannot be pressed. Also, since it is disabled, there is no press and release animation.

Hi @oleg-derevenetz. In this case, I see two options:

  • button can be pressed in the disabled state
  • add another state for the hero movement button, which will show that there is a hero path, but there are no movement points;

Could you describe how you see the solution to this problem?

@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Sep 5, 2024

I'd prefer to add a special state for this case, just like it's done for the "visit the object under the hero" action, but we need some artwork for this, which would somehow graphically indicate the possibility of canceling the current hero route.

@AlexSnowLeo
Copy link
Contributor Author

I'd prefer to add a special state for this case, just like it's done for the "visit the object under the hero" action, but we need some artwork for this, which would somehow graphically indicate the possibility of canceling the current hero route.

Do we need to wait for the icon design for this feature? Or is it possible to use some existing image?

@oleg-derevenetz
Copy link
Collaborator

Do we need to wait for the icon design for this feature? Or is it possible to use some existing image?

I am not aware of any existing image with the suitable style and meaning, so we need to come up with and draw it first.

@AlexSnowLeo
Copy link
Contributor Author

AlexSnowLeo commented Sep 6, 2024

Do we need to wait for the icon design for this feature? Or is it possible to use some existing image?

I am not aware of any existing image with the suitable style and meaning, so we need to come up with and draw it first.

Do you have any instructions on how to do this? Or is it possible to ask for help from a certain person (interface designer)?
I could try to draw a new icon based on the current one, but how do I get the current one and add a new one to the game data?

@oleg-derevenetz
Copy link
Collaborator

Do you have any instructions on how to do this? Or is it possible to ask for help from a certain person (interface designer)?
I could try to draw a new icon based on the current one, but how do I get the current one and add a new one to the game data?

I see two options here:

  1. You can generate a new button image based on existing button image, like it's done in Add hero action button image #7979;
  2. You can draw a new button and add it to the resurrection.h2d, like it's done e.g. in Add Editor icon to the Main Menu #8599. You will need to use the h2dmgr tool (see the contents of src/tools) to add a JPG or PNG image to our data file. These tools are available for certain platforms as separate archives in the Releases section (e.g. here for Windows) or you can build them yourself.

I think the choice of option depends on the desired button image (it will also need to be thought up).

@AlexSnowLeo
Copy link
Contributor Author

AlexSnowLeo commented Sep 6, 2024

I think the choice of option depends on the desired button image (it will also need to be thought up).

The idea is something like this. Show a red destination at the bottom, as in the additional icon with a horse on end.
002_

Maybe we should bring this up for discussion?

@oleg-derevenetz
Copy link
Collaborator

Maybe we should bring this up for discussion?

Hi @ihhub @zenseii @Districh-ru @Branikolog what do you think about the image? Any ideas?

@zenseii
Copy link
Collaborator

zenseii commented Sep 6, 2024

@oleg-derevenetz and @AlexSnowLeo. The concept in the picture is pretty much what I had in mind. Since we are making a pressable replacement for the disabled state of the button, in other words when there are no movement points left, maybe something like a horse that has been tethered to a short pole, to symbolize having parked for the day.

@AlexSnowLeo
Copy link
Contributor Author

AlexSnowLeo commented Sep 7, 2024

@oleg-derevenetz and @AlexSnowLeo. The concept in the picture is pretty much what I had in mind. Since we are making a pressable replacement for the disabled state of the button, in other words when there are no movement points left, maybe something like a horse that has been tethered to a short pole, to symbolize having parked for the day.

Unfortunately, I am far from an artist. Maybe something like this? I will also attach the source code in the format paint.net.
002__
002.zip

How it's looks like in game:
image

@ihhub
Copy link
Owner

ihhub commented Sep 7, 2024

@AlexSnowLeo and @oleg-derevenetz , let's wait for @Districh-ru being available. He generated the original icon and he could suggest how to do it for the new one.

@ihhub ihhub added improvement New feature, request or improvement ui UI/GUI related stuff labels Sep 7, 2024
@oleg-derevenetz
Copy link
Collaborator

Unfortunately, I am far from an artist.

We are also not talented artists, so making changes that require new art is usually problematic. But in this case, I'm afraid we can't do without it if we want everything to look nice.

@Districh-ru
Copy link
Collaborator

Hi, @AlexSnowLeo, I've made the hero action button image by simply taking an action cursor and placing it on the button image with a small corrections.
Unfortunately we don't have any image or cursor for the clear path action. I can suggest to take the original images from ICN::ADVBTNS and ICN::ADVEBTNS.
You can use the clean button image made in lines 4046-4061 in agg_image.cpp, copy it to the IDs 18 and 19, copy a top part of the horse from IDs 2 and 3. Then draw the tail and legs.
It is a big "pixel-precision" work...
Good luck!
If you have any questions, please ask)

@AlexSnowLeo
Copy link
Contributor Author

Hi @Districh-ru. Yes, I have already considered this place in the code and tried to draw something suitable from the existing pictures of the game. But unfortunately there is no suitable picture (perhaps the image of the hero on a horse is suitable, but it is too colorful). Maybe there is not only another way to go? Make a mask of the image of a standing horse. And then apply it in the code along with the shadow on the button. The problem for me so far is only in shadow rendering. And let's still choose a concept, is this the one that @zenseii suggested - a horse standing on a leash?

@ihhub ihhub marked this pull request as draft September 21, 2024 04:29
@Districh-ru
Copy link
Collaborator

Hi, @AlexSnowLeo, sorry for the late reply.
Yes we can choose @zenseii's concept.
We can use the original button image, but redraw the legs and draw a pole.
If you have questions or issues making the image or its shadow - please write.

Hi, @Branikolog, what do you think about this image for the cancellation of move path?
002__

@zenseii
Copy link
Collaborator

zenseii commented Sep 21, 2024

@Branikolog, @Districh-ru and @AlexSnowLeo.

I have asked @FlorianBaba for his assistance/advice since he is a skilled pixel artist.

@AlexSnowLeo's graphic looks like what I imagined, but I realized it looks a bit too crammed and perhaps too detailed to easily understand what it represents at a distance. I believe with some fine-tuning we can improve it though this is outside of my abilities.

@FlorianBaba
Copy link
Contributor

FlorianBaba commented Sep 21, 2024

Hello there 👋

Indeed, I would love to participate.
I just need to think about it a bit to come up with a suitable icon.
But it shouldn't take me too long, I'll try to do it next week!

I'll keep you posted 👍

@FlorianBaba
Copy link
Contributor

Hi everyone 👋

I've spent some time thinking about a suitable icon, trying to respect the original style.
Here are 4 suggestions:

horse_icon_A A
horse_icon_B B
horse_icon_C C
horse_icon_D D

Just to share you my approach, I first tried @zenseii idea, which I thought was a good one. But I came to the same conclusion : i.e. that the icon is visually overloaded and not easily understandable.

Then I went back to @AlexSnowLeo original idea, using the destination cross of the route taken by the heroes on the map. I tried to make the cross more prominent by using a horse's head icon.

@zenseii
Copy link
Collaborator

zenseii commented Sep 26, 2024

@FlorianBaba

horse_icon_D D

I'll repeat some of the comments I wrote to @FlorianBaba in DM here. I think the icon D which is a development of @AlexSnowLeo's idea is the best because it keeps the same concept as the other two states of the button, which are the prancing and walking icons, and you can see the entire horse on those too. The idea of removing the trail before the cross is better imo because it couldn't be interpreted as representing a walkable path, due to the monochrome nature of these icons which some might interpret as referring to the green arrows.

It might give an impression of inconsistency if we change the icon to just show the head. As for the head being filled with one color, this might be seen as inconsistent with the general style of these icons which apart from the horse, have very thin lines outlining them and some amount of detail drawn within the object, like the knight's head having facial features etc.
image
The similar idea can be seen in other monochrome icons:
image
image image

The exceptions are the horse and the view world button, however they are generally smaller icons than the horse head icons.

Meanwhile, on @FlorianBaba's Discord server there was a discussion about this and some good ideas were given. One was to have a horse standing still and with the head bent down. In my opinion this would fit in well with the logical group: prancing; walking; standing still.

@FlorianBaba
Copy link
Contributor

FlorianBaba commented Sep 26, 2024

We talked it over with @zenseii and thought it would be interesting to add a new suggestion, the one he mentioned in his previous message.

horse_icon_E E

It's up to you to choose now ^^

@Branikolog
Copy link
Collaborator

Branikolog commented Sep 27, 2024

Hello everyone!
Thanks for making so many choices. :)

I personally prefer D from an implementation quality state.

horse_icon_D D

Not perfect one, though.

Logically, I expect something like @AlexSnowLeo proposed. Just a standing horse. We already have galloping and dancing icons, so new standing one feels appropriate. I'm only concerning about the horse design. Needs to be more polished and better proportioned. I also not sure about cross or ! mark. It looks too tiny. I prefer an icon being more simple: without multiple small details.

002__

I personally thought about placing just a cross, which is used for path destination, on this button :
image

It can look simple and really easy to distinguish from other icons.

But the standing horse feels kind of uniform design. 👍 It just needs to be more proportional, and players should always be able to easily distinguish it from the other two button states, especially the galloping one.

@zenseii
Copy link
Collaborator

zenseii commented Sep 27, 2024

@FlorianBaba

We talked it over with @zenseii and thought it would be interesting to add a new suggestion, the one he mentioned in his previous message.

horse_icon_E E

It's up to you to choose now ^^

Very nice! This is the idea I had. The reason to have the head bent is to distinguish it more from the galloping horse. I have some small comments. The horse looks a bit rounder around the stomach so maybe we could make it leaner?

I believe there's something about the ears we can adjust. I'm not an equine expert but should their ears point down when they bend their head down?

The tail looks like it has become a bit shorter, but I'm not sure there's enough space to make something that distinguishes it more?

@Branikolog, I also considered having only the cross, but I believe it will look incoherent if the button switches states between Galloping horse, Prancing horse and a cross. This is why I'm in favor of the horse standing still.

@FlorianBaba
Copy link
Contributor

FlorianBaba commented Sep 28, 2024

@zenseii I've tried to take your feedback into account for the E version.
It's not easy on very small icons, because each added pixel completely changes the perception 😅

So :

  • The tail is lengthened and revised
  • A few pixels have been removed to make the horse less plump.

horse_icon_Ev2 E v2

Your feedback on the ears made me smile, because I had asked myself the same question as you the first time.
But after checking, the ears point upwards when the horses are grazing.

horse1
horse2

@Districh-ru
Copy link
Collaborator

@zenseii, thanks for the detail comparison and explanation!
I'll try to update the shape and the shading tomorrow using the new code. And if it'll be hard or the code will be big enough I'll revert the changes.

@Districh-ru
Copy link
Collaborator

Hi @zenseii!
I've reverted the icon generation code but updated it a little. :)
Also I've addressed the issue @Branikolog mentioned here: #9085 (comment)

@zenseii
Copy link
Collaborator

zenseii commented Jan 18, 2025

@Districh-ru, thanks! I will have a look at this PR as soon as possible. I suppose we can change it to ready for review now?

@Districh-ru
Copy link
Collaborator

@Districh-ru, thanks! I will have a look at this PR as soon as possible. I suppose we can change it to ready for review now?

@zenseii, yes it can be reviewed now.
The code is big, but I have no idea how to make is smaller since we want to make a better than functionally generated shading for the horse icon than functional generation can give now.
Or should we add the generated image parts to resurrection.h2d? (maybe in the next PR and not only for this image...)

@zenseii zenseii marked this pull request as ready for review January 18, 2025 17:30
@zenseii
Copy link
Collaborator

zenseii commented Jan 18, 2025

@Districh-ru

The code is big, but I have no idea how to make is smaller since we want to make a better than functionally generated shading for the horse icon than functional generation can give now. Or should we add the generated image parts to resurrection.h2d? (maybe in the next PR and not only for this image...)

This could be a possibility and honestly a better approach to take moving forwards since it took quite a lot of time to write every line for almost every pixel. Basically the only original part used was the horse's head and somewhat the legs. But I do remember @ihhub saying that the amount of lines didn't really matter much.

@LeHerosInconnu
Copy link

Hello @Branikolog,

Yes, I think the states of the movement button should remain as they are now.

As I mentioned before, we shouldn't allow to click and hold on disabled movement button, as it looks not that good. To initiate route reset the button should be always in active state, so player could confirm, that something is happening. So not to confuse old players with active state of the old movement button (running horse) I suggest using the new button with standing horse for the case hero has 0 movement points. It's not that ideal solution, but up to implementation of the expanded UI I think it a compromised solution.

The state of the button also serves as a visual indicator to the player that the hero still has movement points or not (button in standard state, hero can move, button in grayed out state, hero can no longer move).
Now, if a different button is introduced and in its standard state the hero has no more movement points, this initial way of information is lost.

@zenseii zenseii requested a review from ihhub January 19, 2025 10:04
@zenseii
Copy link
Collaborator

zenseii commented Jan 19, 2025

@ihhub, this PR is ready to be reviewed. The standing horse button being active when no movement points are left is a compromise so that it is always possible to clear a path and the button state has to be released to have proper button feedback.

A button to clear the path can be seen as future-proofing for the feature of planning a path during your (human) opponents turn which could be executed at once when its your turn.

@ihhub ihhub changed the title #8924 fix Hero Movement button Update Hero Movement button Jan 19, 2025
@ihhub
Copy link
Owner

ihhub commented Jan 19, 2025

@Districh-ru

The code is big, but I have no idea how to make is smaller since we want to make a better than functionally generated shading for the horse icon than functional generation can give now. Or should we add the generated image parts to resurrection.h2d? (maybe in the next PR and not only for this image...)

This could be a possibility and honestly a better approach to take moving forwards since it took quite a lot of time to write every line for almost every pixel. Basically the only original part used was the horse's head and somewhat the legs. But I do remember @ihhub saying that the amount of lines didn't really matter much.

From the maintenance point of view having an image difference stored in resurrection.h2d file would definitely be better. Yes, let's do this in a separate pull request to avoid extra work for this issue.

@ihhub ihhub merged commit 0305100 into ihhub:master Jan 21, 2025
22 checks passed
@ihhub
Copy link
Owner

ihhub commented Jan 21, 2025

@AlexSnowLeo , @zenseii and @Districh-ru , many thanks for this feature!

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 ui UI/GUI related stuff
Projects
None yet
8 participants