Improve soldier list in building windows

Bug #569534 reported by Nicolai Hähnle
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

The list of soldiers stationed in a military site or training site could be improved in several ways.

1) The current health of soldiers should be shown (as a percentage or a health bar) to help plan the timing of the next attack.

2) Soldiers on the map, battlefield, etc. have icons above their head showing the level of the soldier in a concise way. These icons should also be shown in the soldier list, so that players can learn more easily what their meaning is.

In fact, the entire soldier table could probably be replaced by an iconic representation of the soldiers. The numeric value of training levels can then be displayed by a mouse-over-controlled textarea.

Related branches

Revision history for this message
Raul Ferriz (raul.ferriz) wrote :

I like this new proposal of soldier UI

Changed in widelands:
status: New → Confirmed
Revision history for this message
SirVer (sirver) wrote :

+1 for this

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Would be great -- and warehouses/Headquarters could get it too?

Revision history for this message
Raul Ferriz (raul.ferriz) wrote :

For sure, once that inteface is created for one window, it is easy to insert on HQ/WH.

Revision history for this message
Raul Ferriz (raul.ferriz) wrote :

To acheive that, UI::Table should be able to accept pictures, and text. I do not know if now UI::Table support this. Anyone knows?

Revision history for this message
Nicolai Hähnle (nha) wrote :

It can, since my merge of the building UI changes, as you can actually observe in the current soldier list already. However, my proposal would most likely eliminate the use of UI::Table, because soldiers would no longer be displayed in a tabular form (maybe in a first step they would be, but I'd really prefer a display without scrollbars).

Revision history for this message
Raul Ferriz (raul.ferriz) wrote :

I can't imagine a soldier display with all required info that do not have scrollbars...

The only space optimization I could imagine is 'pack' soldiers that were exactly equal. I mean, that they share all levels and had exactly same amount of life (normally at full HP).

Revision history for this message
Nicolai Hähnle (nha) wrote :

In the last paragraph of the original bug/wishlist description I wrote how it could be achieved in my opinion: By displaying soldiers *only* by icon. The icons are small enough that we could fit e.g. 6 icons in one row, then I believe two rows are enough for all currently existing buildings (but this can be adapted dynamically).

To give players the ability to learn what the icons mean, I would add an additional info line that is updated to display the detailed stats of the soldier which is represented by the icon under the mouse.

Revision history for this message
Raul Ferriz (raul.ferriz) wrote :

I have readed, yes on militarysites and trainingsites that could be enough to show soldiers. But on my own branch, I show soldiers on headquarters (not in warehouses) and here you had around 45 soldiers at begining ;-) and it is easily that you reach 100 or more if you center your economy on soldier production. You could show scrollbar only when needed then.

But I like a lot showing soldiers 'as is' as icons, and display detailed info only when mouse is over, just like ware display.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I have been monitoring the soldiers progress and they way they are trained in game a while ago.
I needed to understand the things better.
I found that I had problems with distinguishing the soldiers' level icons and have therefore painted my own ones.
They are not beautiful, but easier to tell apart for analysing purpose.
The color of the symbol becomes brighter with higher levels (think of heated iron) and is equal and comparable among the tribes.
(I later found that this idea isnonsens, as there are different strenght gains per level for the tribes)
The color of the rim becomes brighter as the soldiers get nearer to their tribe's maximal possible training strength (white=Max)
Perhaps useful for some one.

Revision history for this message
SirVer (sirver) wrote :

astuur, those icons are quite an improvement. Could you modify them slightly? I suggest black being always lowest, white always the highest level so that a level 0 soldiers is always all black and a level 10 soldier is always all white. those attributes that can't be trained can be white per default. I like the symbols very much, imho they are much clearer than the one we have now. I also like that the symbol itself does not change, only the color and it's surroundings.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I'd gladly change whatever you want..... I just don't quite get the point.
Lack of Coffee here, I suppose.
I attach another overview of what I had in mind when I did these icons.
Maybe it helps for clarifying what I should change

PS: Don't you think those icons are a bit too flashy and un-stylish to include into the game?

Revision history for this message
Nicolai Hähnle (nha) wrote :

I'm not so sure, have you actually tried these icons in-game? Obviously this has to be determined by actual testing, but I'm a bit wary that the difference between levels may be too small to be distinguished: the human eye is very good at detecting small changes of colors that are right next to each other, which makes the symbols' colors appear quite distinct in the PDF. However, will you really be able to tell the level corresponding to an icon quickly when it is shown alone because only a single soldier is visible on the screen?

I'm a bit doubtful especially about the different shades of orange to yellow. I don't see what's wrong about changing the shape of the icons in addition to the color: of course one has to learn the meaning of the shapes, but once you know them, they're easy to distinguish.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

You're right. The bright red -> orange may be critical. So are some shades of light grey for the borders.
I use those icons all the time in game, and for me they are just about different enough to tell them apart.
I cannot remember a situation where I had one soldier on screen alone though, with an orange hue and needed to clearly identify it. That is because currently the training sites do not release soldiers unless they are fully trained - .

But, as you say, this cannot be determined by the pdf (especially as this pdf has those crude jpg artifacts)
(I have attached a PrtScr to this post, to better show the colors)

Other color schemes could easily be found with a clearer distinction between the levels (black, magenta, cyan, red, brown, yellow, white), but it wanted a logical sequence that is easy to remember. That goes for border colors, too.

I had initially experimented with the original idea of 1 axe, 2 axes, 3 axes etc. -- but they are hard to recognize in their meaning.
The space available is just too limited. On the other hand I'd hate to make it larger; those signes above soldier's heads are obtrusive enough as they are. Tthat's how I went for color coding.

Revision history for this message
Raul Ferriz (raul.ferriz) wrote :

I do not like a color only difference between levels and allways use same shape. I prefer having different shapes and color, for example:

Empire can had 3 different shapes for shield: little squared, medium squared and big squared.
Level 1 is little squared wooden color.
Level 2 is little squared iron color.
Level 3 is medim squared wooden color (with borden in iron)
Level 4 is medim squared iron color
Level 5 is big squared iron color.

For weapons more or less the same:
Level 1 is thin wooden sword
Level 2 is thin iron sword
Level 3 is medim iron sword
Level 4 is medim iron sword with some details on gold
Level 5 is big gold sword.

Evade and Health can be done at same direction with hearts and ... same icon that represent evasion ;-)

But if single color same shapes will be used, then IMHO I think that icons should be drawed on a single row above or below soldier, not with two rows to not disturb user experience. Little single color icons, little impact on game ambient, I think.

I'm very bad drawing so I will not try to make a picture of this to not hurt your eyes.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Raul, you know, these icons are 10x10 pixels.
I see no way of making a "little", "medium" or "large" shape, that you can still identify as being the same -- much less
something recognizable as "wood" or "steel", or "gold".
Just give it a try yourself, you need not publish it :)

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I have tinkered around a bit more with the soldiers' level indicators in an attempt
to optimize the visibility (in all worlds) and discernability.

Improved (hopefully) the shades of dark red, bright red, orange, yellow, white to make them easier to tell apart.
The colours are the same for each level among all tribes.

Abandoned the black -> white border colour scheme (to hard to read in Winterland)
Borders now have the same color as the symbols (depending on the level)

All borders for maxxed properties produce a white, continuous border in their quadrant,
which is independent from the colour of the symbol itself.
Fully trained soldier are clearly identified by an uninterrupted square border in white.

Untrained properties are shown in black, with a black border, unless
this property cannot be trained by those soldiers, in which case the border is white.

All borders for soldiers' properties, that are not fully trained have a gap.
This way it's easier to discern yellow from white border. (White borders never have gaps)

Improved visibility of lvl1 (black) symbols against dark background (Blackland) by adding a light grey double contour.

Please give me your thoughts about this version. Changes are easily done, but deciding where to compromize is the hard part.
Could this be helpful for a new graphical Soldiers' list display?

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Only one attachment per comment :(
So here now is the 7z with the icons themselves.

Revision history for this message
Nicolai Hähnle (nha) wrote :

I had written a longer reply here, before I realized that this whole discussion is very much a bikeshed discussion (if you don't know what I'm referring to, google it). In the end it doesn't matter much, but somebody has to put their foot down in one way or another, because this cannot be resolved by a technical argument (usability considerations do play a role, but it's also about style). Holger? Other foot-putting-down person?

Now, for what it's worth, some likes/dislikes in abbreviated form:
- Yellow (level 4) and orange (level 3) are too close to each other. Not sure why, it might be my monitor's color temperature or my color perception, but they look almost identical. I think four shades of red-to-yellow are a bad idea: no matter how you place them, they're always going to be fairly close to each other. It would be better to throw some blue or gray in there somewhere.
- I still don't see what's wrong with the currently used symbols, to be honest. They are discernible and easily understood, e.g. more axes means more powerful attack (maybe they're a bit dull...)
- I like the idea of involving the border, and of making the highest level always white. I would in fact also make the *symbols* white at the highest level to make it even more clear.
- In-game, the transparency looks odd to me, and things behind the soldier icons get confused with the soldier icons themselves, even though you did a good job already with borders and such. Perhaps you can make the background only semi-transparent?

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Thanks for testing, Nicolai - and thanks for your opinion.

>> but somebody has to put their foot down in one way or another, because this cannot be resolved by a technical argument (usability considerations do play a role, but it's also about style). Holger? Other foot-putting-down person?

Probably the job to decide will finally remain with Holger --- but on what basis?
He will want opinions and alternatives to choose from. Unfortunately you really must see this thing in the game, in all worlds.

>> Now, for what it's worth, some likes/dislikes in abbreviated form:
- Yellow (level 4) and orange (level 3) are too close to each other. Not sure why, it might be my monitor's color temperature or my color perception, but they look almost identical. I think four shades of red-to-yellow are a bad idea: no matter how you place them, they're always going to be fairly close to each other. It would be better to throw some blue or gray in there somewhere.

I wanted to avoid that players have to look up somewhere what is higher - blue or green?
So I wanted some sort of "natural" sequence (in this case the colour of heated steel).
I could try the sun's spectrum instead from (infra) red to (ultra) violet. But those colours might be less pleasing, and I am not even sure if this _is_ a natural order for most players.

>> - I still don't see what's wrong with the currently used symbols, to be honest. They are discernible and easily understood, e.g. more axes means more powerful attack (maybe they're a bit dull...)

Equally honest: I did not recognize the 3 axes for what they were at first, It appeared a simple geometric sample to me.
And the evade icon, was also unintelligible.
The problem is of course that the space is too limited to draw 1 to 5 distinct symbols in an area of 10 by 10 pixels (including border).

>> - I like the idea of involving the border, and of making the highest level always white. I would in fact also make the *symbols* white at the highest level to make it even more clear.

I tested that idea (it seemed Sirver wanted it) in Winterland. No good. Not visible against the background. Different sets of icons for different wolds could be a solution, but is it worth it? Besides, it looks dull and you loose any info where the tribe-specific advantages and disadvantage are. Admittedly not that important.

>> - In-game, the transparency looks odd to me, and things behind the soldier icons get confused with the soldier icons themselves, even though you did a good job already with borders and such. Perhaps you can make the background only semi-transparent?

That was an attempt to make the stuff less intrusive. Totally opaque would be easiest and clearest. Semi-transparent would mean alpha channel, and I have not tested that so far.

On a side note: Yes, this is a lot of fuzz about such a small contribution. But it affects everyone, though some may not have a strong opinion about it. I think it worth investing some time and thought. Leaving a fingerprint is unimportant: I’m not so vain :)

Revision history for this message
SirVer (sirver) wrote :

I think this discussion has some fruits to it still, that's why I have not outed my definitive suggestion (which I am so eagerly to do in normal circumstances). I see the point of astuur and and nicolai.

Current symbols, thoughts:
- The symbols were not clear to me at all. I still get confused with evade now and then
- The tribes have different symbols. I'd like to recognize a lvl 3 attack soldier, no matter which tribe.

So I see some work here.

Astuurs proposition:
- The transparency distracts more than help. I vote for making a solid background as it is with the old symbols.
- The colors are hard to distinguish. And there is the problem with red/green blind people. I see this as profound problem as I guess that all color coding will have this problem.

My thoughts:
I suggest retackling this, no approach was ideal now. For me, the following question is still not quite answered: What information do we want the symbols to carry? I'd like to have the following:
- absolute level of soldier in a certain skill in a clear and understandable way (I suggest using shapes for this).
- is this soldier fully trained/can still be trained/not trained at all in this skill? (I suggest colors - black, grey, white for this). The question here is what about defense for barbarians (which they can't train). I'd root for marking these as "fully trained" though they also are "not trained at all".

So, for me it boils down now to work on the shapes. It needs some ingenuity to come up with good graphics.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

One more question, SirVer:
The size of the icons is fixed to the current size?

Revision history for this message
SirVer (sirver) wrote :

changing the icon size would require some code changes afaik. There is a natural limit given through the proportions of the soldiers though, much bigger will likely hinder more than help (for example when there are big clumps of soldiers close to each other).

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Here is a version that should meet SirVer's demands, though in a very primitive way.

Honestly, I hate them for their pathetic look and lack of colour.
They're equally good at all worlds though, because of the opaque background.
Besides, the yellow dots are too small for me to clearly identify for me - but that of course depends on the resolution and screen size
that you use --- and your eyesight.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

The icons themselves

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I decided that I need to dedicate a larger area to the distinction of the training levels.
Alos, choose a brighter grey as background and introduced a third border color (cyan) for all trainable properities.
All colours also have a different grey level.

I am not unhappy with this one.
The levels can quite easily be seen even on higher resolutions, and the color itself is no more important, so different colour space, monitor calibrations and such things do not factor in here.

Maybe red is too flashy a colour for that purpose - so I might try something else with a good contrast to black and bright grey. Possibly the black/cyan border signalling "not fuill trained" can be given up for an all cyan border.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Soldiers Icons v.4

Revision history for this message
Astuur (wolfsteinmetz) wrote :

After some more testing I now come up with another idea --.
It's the final thing as far as my attempts at it go -- unless somebody wants something changed, that I should do.
Also, I have spared you from viewing the intermedial steps :)

It's nothing fancy, but it's clearly discernable, easy to remember and not too intrusive, I hope.

I had thought about replacing the red dots with playercolor, but -- depending on that player color - this can be lead
to too little contrast. So I stick to red (red-orange)

Attached here is an overview

Revision history for this message
Astuur (wolfsteinmetz) wrote :

V.11 Soldier Icon files

Revision history for this message
Nasenbaer (nasenbaer) wrote :

The new one is a step backward sfrom my point of view.
The Soldiers IconV4.7z look already quite nice.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Hi Nasenbaer!

The trouble with that version was, that it showed very small red dots at the lower levels, and too much red at higher ones.
I myself had some trouble interpreting it inside the game. But it all depends an monitor size, resolution etc......
I personally like the V.11 better

Revision history for this message
SirVer (sirver) wrote :

i like the last proposition. I take them to trunk now; as soon as they are in game, they will get more discussion, I am sure. Thanks for the hard work, Astuur!

SirVer (sirver)
Changed in widelands:
milestone: none → build16-rc1
Revision history for this message
Astuur (wolfsteinmetz) wrote :

Nothing hard about that - just time consuming.
Glad I for once could help here.

Revision history for this message
Nicolai Hähnle (nha) wrote :

I have a preliminary implementation of the icon-based soldier list in lp:~nha/widelands/soldier-list

Will merge soon if there are no objections.

Revision history for this message
Nicolai Hähnle (nha) wrote :

Known bugs in that branch: economy configuration window and attack window have slightly wrong UI. Everything else seems to work fine though.

Revision history for this message
SirVer (sirver) wrote :

I just totally dig the ui solution you found, nicolai. Some minor glitches I found:

- pushing the capacity up/down on for example barbarian fortresses makes the window jump in size ~2 px. Just build a fortress, up the capacity and down it again fastly.
- If you down the capacity while a soldier enters the building, the sliding graphic slides outside of the boxes which is just a minor thing.

I have not checked out the other bugs that you mentioned.I could imagine an attack box with a similar GUI though (that just shows the soldiers that are in range to attack and you can check/uncheck them to select them for this attack).

Revision history for this message
Nicolai Hähnle (nha) wrote :

Thanks :)

I can confirm the problems you mentioned.
- as far as I can tell, the small jump is actually due to a size jump of the Textarea that indicates the current capacity
- I will fix the sliding outside the proper area as well (hmm, I suppose there are some corner cases where it can't be fixed unless the black area also shrinks in a sliding manner)

I've also considered the possibility of such an attack box. I believe it would fit well as an advanced setting, i.e. basic UI is just what we have right now, switch to advanced and you get a similar display of available soldiers.

Revision history for this message
SirVer (sirver) wrote :

I actually would find the other attack box more intuitive as what we have right now. It would also add more control/information about your attacking force. I see no loss by replacing what we have right now through what we could get. Is there one?

Revision history for this message
Nicolai Hähnle (nha) wrote :

I spoke too soon about the sliding soldiers :/

The problem is that the code relies on the clipping implemented by RenderTarget, and that is limited to rectangles. So once you have a non-rectangular shape, all bets are off.

As for the attack box: I absolutely like the suggestion of being able to directly see the soldiers. I just believe that there should still be a way to quickly select all / roughly half / etc. soldiers, without a lot of clicking. Of course, there's no reason why we can't have both...

Revision history for this message
Nicolai Hähnle (nha) wrote :

Okay, I've gone ahead and merged the UI changes. Since this bug report has grown quite long already, I've opened a separate wishlist bug for the attack box thing (bug #585981).

Changed in widelands:
status: Confirmed → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in build16-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.