Improve soldiers status display

Bug #794407 reported by BeniH
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Wishlist
GunChleoc

Bug Description

Yesterday i ordered a rather huge assault. There where soldiers everywhere and the status indicators overlapped nearly everything. This way much of the game feeling went away.

I think it would be very nice, if the display of the status icons (training state and health bar) would only be shown if soldiers are in buildings OR if they are in the field AND the status-overlays are on (user pressed S(or was it C?) to show productivity of buildings)

Tags: military ui

Related branches

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Hmmm.... it's actually during battle when I really want to see these things.
So I don't think your first suggestion is really helpful.
I do admit, that it doesn't look very nice, though, if your screen is cluttered with all
those indicators.

But maybe displaying the status could be toggled from the keyboard?
The programmers must answer this.

summary: - - Suggestion; only show soldiers status when showing building statistics
- or when inside mil-building
+ Only show soldiers status when showing building statistics or when
+ inside mil-building
Changed in widelands:
importance: Undecided → Wishlist
tags: added: military ui
Revision history for this message
Hans Joachim Desserud (hjd) wrote : Re: Only show soldiers status when showing building statistics or when inside mil-building

I agree the indicators above their heads take up a lot of space, especially in large numbers. Though I'm not sure it would help to tie it to the statistics view, as I think most players turn that on anyways. In battles, you will be torn between seeing what's going on, and how the stats are changing.

I think most other games solve this problem by hiding such information unless the units are selected, but I don't think that makes sense here when you cannot really control the units or give them orders in any way.

I do think this should be improved though, and look forward to other suggestions.

Off-topic:
Astuur! That's the largest army I have seen in Widelands. Roughly how many soldiers did you have at this point? How long did it take to build it up?

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

What about having two different keys to toggle levels and healtbar?

For example:
Pressing 'L' key, soldier levels are visible/hidden (Attack level, defense level, evasion level and health level not the health bar!!)
Pressing 'H' key, soldier health bar is visible/hidden. Only healt bar.

Explanation, during a training, only levels should be important for the player, so he or she can toggle off soldier health bars pressing 'H'. After some time, when he or she launch an assault, is more important to see soldier healthbars to make some important decision, like burning out your own buildings! So player can toggle them visible pressing 'H' again. Once a player has a very solid economy, and most of his soldiers are top leveled or simply if the player is creating a mass of low leveled soldiers and soldier level is not important, he or she can toggle off level simply pressing 'L'.

What do you think about this approach?

Revision history for this message
Astuur (wolfsteinmetz) wrote :

@Raul: When I am watching my soldiers fight, I always like to see both, the damage they take (an bring to their oponents) and their skill level, because otherwise the damage is not interpretable -- so your suggestion would not help me much, I'm afraid.

@ HJD: I am otherwise very much for having the toggle for soldier's status not connected with the buildings!
Why should we force such a restriction? Is it any easier to implement, if you must not dedicate another key combination? If that is so, I would understand, otherwise I'd rather have a choice.

OT: Hehe... that is an old screenshot, and if you look closely, it's not really a battle.
It is the final victory against a huge AI realm that has been retreated more and more and finally had all its soldiers in that last warehouse that I took.
I don't remember what the actutual game time was, but I know that I had been playing that particular game for more that 30 hours (time compressed); I had several hundered fully trained soldeirs by then.

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

IMHO, I would like to see that levels changes reflects on soldier model/image instead of having a 2x2 images over his head. For example for every level of attack sword/axe on model is bigger or brighter. For every level on defense, shiled is bigger. For every level on health armour cover more body and is also brighter. And for every level on evasion, boots are brighter :P, for example :D.

BUT this is very expensive to achieve, a lot of rework will be needed to support this, not only on drawing graphics, also on reworking the way pics are selected for bobs.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Yes, I would like to see both skills/health as well. I initially thought about showing skills in training, and health bars in attack but it just offers less info than the combination.

Astuur: there's no technical reason to force such a restriction. That's just a question of checking if the key in question is pressed or not to toggle it, so it can be any key (this is the easy part).

My main issue is that the indicators are overlapping, and making it hard to see more than the fight in the foreground, and whether the indicators above are connected to that fight or the soldiers standing close behind. With large groups fighting I have problems making out both the soldiers animations fighting and the changing information. With the possibility to toggle the indicators, I can see the fighting soldiers or the overlapping information. However, when the information is on it will still be overlapping and hard to make out, so I'm not sure how this makes it easier to understand what is going on.

An option like toggling the indicators could be added, rather easily I would assume, but I'm not sure it would address the problem.

Ok, after writing that I started wondering if I may have misunderstood some of you. I think toggling both health bar and skills would not help much, however IMO the skills take up the most unnecessary space. Being able to toggle only skills (health bars are always shown) for soldiers walking outside it may be easier to see. You can still check skills in buildings before attacks, and turn it on to see what the incoming enemies have. However, when the fighting commences, you can turn it off to better see the soldiers and health bars. I still have the feeling it is a workaround to compensate for the information overload soldiers walk around with, but it might work.

OT: Ah, a good old "destroyed-HQ-anthill"? I was hoping you were attacking something with a bajillion soldiers.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Look here Raul:
http://wl.widelands.org/forum/topic/716/

It seems to burn down to a graphics problem.
I wished Wl would have chosen a different scale when it was
in planning, so that graphics could have more pixels.
Life would be a lot easier, but I'm sure it seemed
bold at that time to go for what we have.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

>HJD: I still have the feeling it is a workaround to compensate for the information overload soldiers walk around with, but it might work.

Yes, I see it likewise, but unless we can have some sort of "natural" distinction for soldier' properties, we'll have to cope somehow.

If key assignment is not the problem, why not have one for health bar and one for skills?
That's most flexible.

I have feeling, that when you're in a situation, where you can no longer clearly see whom the health bar and the
skill badge belong to, you won't have the time nor need to really care about individual duels.
So, dont worry overmuch :)

What seems more important to me, is to have different colors for the skills (per player!) so it's easier to discern foe from friend - if the skill sign survives. But that is a different topic.

Revision history for this message
BeniH (beni-hallinger) wrote :

I agree with what Astuur says in his forum post and also want to drop in that the ionformation is of no particular use when commencing battle - the decision to attack was already issued and could not be taken back, so it does not matter which soldier has what stats or what health. I must rely on the engine to retrat my soldiers and to pair my soldiers with the enemy good anyway.

The problem would not be such one when we would have a similar system like with the miners experience, so the soldiers do not have individual trioning levels but only on huge level combining the individual stats into a "package" which is then reflected by the soldiers appearance. I like the concepts in Astuurs forum post and im sure they would also fix this issue here.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

>the decision to attack was already issued and could not be taken back, so it does not matter

I get your point, but it can still offer valuable information. Based on the enemy soldiers it is a lot easier to assess the general level of the enemy army and how it compares to mine. I also find it exciting to see my soldiers finally take out a highly trained enemy soldier. :)

Another thought, somewhat related: why are the skills shown 2x2, instead of in a single row? By placing them all on a row, we could have them using the same width as the health bar, but less height than present.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

I did the current version of the skill display and the health bar.

HJD:>why are the skills shown 2x2, instead of in a single row?

The clear answer is, that I thought I needed to stay within the dimension of the version we had before. :)
So I did not change the size in any way - only symbols and colors.
The health bar is 32 pixels horizontally,including the frame and 5 pixels high.
Each one of the 4 skill indicators is 10x10 pixels.
So we'd have to increase the horizontal size of the health bar by 8 pixels length,
and end up using 40 pixels (5x8) more space.
I am not sure if this is an advantage all in all.
And please do not even start to think about any smaller size for the skills -
we're at the absolut minimum for recognizable shapes!

Revision history for this message
Astuur (wolfsteinmetz) wrote :

alternativly without health bar size adjustment (no additional space wasted)

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

No, I didn't really think we could cut in the size of the skills.

I did like the how that soldier looks, but it may just end up covering horizontal space instead. Which file(s) do I need to edit to reorder the skills and the health bar?

Revision history for this message
Astuur (wolfsteinmetz) wrote :

No Idea, sorry.
That was only a montage.
The little bitmaps themselves are of course at widelands/tribes/[tribe]/soldier

Revision history for this message
BeniH (beni-hallinger) wrote :

Hello,
i dont think that the images should/could be optimized currently. Besides that, optimizing that is another issue which should be discussed separately (imho).

Definitely the way to go is a hotkey for showing/hiding them like suggested above.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Astuur: I see. That also explains why only one soldier was shown. I would like to try it out in the game though, to see how it works.

I may be contradicting what I said earlier, but if we can't find a way to organize the information, having the option to toggle it might be the way to go. That said, I'd rather we'd focus on finding some way to display the information first. I still feel like toggling would be a workaround, but if there's nothing else to be done...

Revision history for this message
BeniH (beni-hallinger) wrote :

I disagree, toggling is no workaround.
Optimizing the display is surely an important thing, but also the ability to completely hide the information would be very nice.

There is also a toggle for the buildings names and statistics, it would only be consequent to also have a toggle for the soldiers stats.

Im sure im not the only player who loves to turn statistics off for some time to just watch the people doing their work.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

In this case, HJD, I see things somewhat differently:
A visibility toggle for soldier skill levels and health bar would be an advantage in any case, and so far independent of any displaying solutions that we might hopefully come up in addition.
From an aesthetical standpoint, those floating badges over the heads of soldiers are just an alien element in the picture, and don't belong there in the first place.
Seen this way, _they_ were the "workaround" for having no better way to display the info.

All the same, they are very useful, and, indeed indispensable.
Whatever might be done in the graphics department, there will be no way to find a "real world" reprensentation for the full information. At best we will see some ranking, which summerizes the skills. This is a hell of a lot of work for the graphics crew, and will take a lot of time.

As for the health bar, I could not even in theory come up with such a "real world" solution.
If we want that info, we'll have to accept it floating over the heads.
All the more it would be nice to have it switchable.
We should accept that there are people out there, that play WL for the pleasure of seeing their planning "materialize" and trying to find an even better one. It's like being the queen of an ant hive.
For them all those "above heads" info is disturbing and only relevant in a final battle.

So, in my view, for the skills, the proper solution must be to try something visible in the "real WL world", like differences in uniform, helmets and armour as diversified as our blender artist can manage to achieve.
The players who want more details about individual soldiers, will have to accept the OHD (over head display).
The heath bar must remain, and I cannot see any reason to change it, other than make it invisible, if the player wants this..

Revision history for this message
BeniH (beni-hallinger) wrote :

> As for the health bar, I could not even in theory come up with such a "real world" solution.
What about giving badly wounded soldiers (eg health<33%) crutches and bandages after combat? This would look cute and give the needed visual feedback. I just need to know if my soildiers are able to conduct an assault in a general sense, not how much health each one of them has exactly. That detailed infomration is useless anyway, as long as we arent able to control individual soldiers (which hopefully never will be impemented at that level).

Revision history for this message
BeniH (beni-hallinger) wrote :

@Astuur: Combined with your "different armor and arms" idea, the bandages and crutches would be an overlay above these.

Revision history for this message
Astuur (wolfsteinmetz) wrote :

Hehe, yeah... that would look kind of cute, but it's not really a full substitute for a health bar.
Don't forget, BeniH, that most people want to see the health bar right there in a battle.
As one example, I need it to decide whether I keep an unconnected sentry, that I have just conquered, or rather burn it down, before the next assault wave.
And I usually must decide while there still is a battle, because after combat, I dont have enough time to manage all sites.
So - "after combat" doesn't really help here, and also I _would_ like to know a bit more precisely how much life is left in my warriors. More precisly than can probaly be done in that way.
Another aspect is the workload: bandages and crutches would have to be there for each picture in the animations, - and
(we don't know yet) they may even need to be different for different ranks.
You could try and create a sample, if you can handle blender. I'd love to see how it looks!
I fear that it is not easy, due to the scale of things to make them clearly visible and not covering other importent features.
But in all fairness, I dont think we have the manpower to tackle that.
At last there is the consideration, whether displaying those things does not already hint a bit too harshly to the
reality of combat,
Not sure

Revision history for this message
BeniH (beni-hallinger) wrote :

True true, i was just dreaming a bit :)

With "after combat" i did not meant after the complete war, but after a individual engagement by two soldiers.
When they finish their fight, the remaining soldier could be marked that way. Besides that i do not think that crotches and bandages should be too "reminding to reality", unless they are blood soaked, what is not my intend. Unfortunately i cannot handle blender and i suck in graphics :(
But back to your situation with the sentry: its true that you loose some details and thats exactly why it would be great to have a toggle which shows the health bar. Personally i dont think that the decision to keep a sentry must be so fine granular but thats just my point of view. Im not the "micromanagement" player regarding militarism in widelands, as i werent in settlers-I (where there was absolutely no information on how much life where in my soldiers). The lack of such precise information would also add some rundomness and uncertainess (and unplannable-ness) to the game, which in my opinion would add to the thrill of widelands-warfare. War is always a risk and in reality a king also does not know that a individual soldier is "50% fine" - he just knows if his troops are combat ready or if they are ill. I think for the scale of my role in widelands (that of a kingdoms leader) this kind of information is just a little too detailed.

So again, a good first start is a simple toggle for health and the stats. I dont think that for health and training status two independent keys are required, just make a toggle for the header as a whole.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

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

Reading through all the comments I suggest the following actionable items:

1) convert the health bars to be 40 pixels and show the icons next to each other as was suggested. I think it looks better associated to the soldier and it does not cost too much more space. Also wider energy bars will give a better idea of the status of the soldier.

2) Replace the 'toggle buildhelp' button with a 'overlays' menu. Move the 'statistics', 'census' buttons in there (they make limited sense where they are now). Also move the 'toggle buildhelp' and a new 'toggle soldier statistics' in there.

How does that sound?

Changed in widelands:
status: Expired → Confirmed
Revision history for this message
wl-zocker (wl-zocker) wrote :

I prefer idea 1. Although it covers some more space, having the icons in one line is more dense and closer to the soldier than the square we currently have. Inside military buildings, when you hover over the soldiers, the order is health, attack, defense, evade. It should be consistent. The UI of military buildings would have to be changed so that the new icon ordering fit in.
Idea 2 sounds too complicated and does not really help. Especially in battles I want to see the health bar and the soldiers' ability. Since these statistics cannot be toggled for individual soldiers, there would still be dozens of icons above the soldiers' heads.
However, creating an overlays menu and move the currently existing ones there sounds like a good idea, independant of the soldier statistics.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
GunChleoc (gunchleoc) wrote :

We could hide the health bars for healthy soldiers.

Changed in widelands:
status: Incomplete → Confirmed
summary: - Only show soldiers status when showing building statistics or when
- inside mil-building
+ Improve soldiers status display
GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
milestone: none → build20-rc1
Revision history for this message
kaputtnik (franku) wrote :

The linked branch does not compile (debug build):

[ 49%] Linking CXX executable test_economy
../../logic/liblogic.a(soldier.cc.o): In function `Widelands::Soldier::draw_info_icon(Vector2<int>, float, Widelands::Soldier::InfoMode, InfoToDraw, RenderTarget*) const':
/home/kaputtnik/Quellcode/widelands-repo/bug-794407-soldier-stats/src/logic/map_objects/tribes/soldier.cc:526: undefined reference to `Widelands::Soldier::kSoldierHealthBarWidth'
../../logic/liblogic.a(soldier.cc.o): In function `Widelands::Soldier::calc_info_icon_size(Widelands::TribeDescr const&, int&, int&)':
/home/kaputtnik/Quellcode/widelands-repo/bug-794407-soldier-stats/src/logic/map_objects/tribes/soldier.cc:574: undefined reference to `Widelands::Soldier::kSoldierHealthBarWidth'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [src/economy/test/CMakeFiles/test_economy.dir/build.make:428: src/economy/test/test_economy] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:9930: src/economy/test/CMakeFiles/test_economy.dir/all] Fehler 2
make: *** [Makefile:141: all] Fehler 2

Revision history for this message
GunChleoc (gunchleoc) wrote :

I did move that in some stage of the code, but it's back in its original place. My best guess is that you have a wonky build. Best delete your build directory and compile from scratch. I'll do the same, just in case.

Also, screenshot time.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Another screenshot

Revision history for this message
kaputtnik (franku) wrote :
Download full text (4.9 KiB)

> Best delete your build directory and compile from scratch.

Done, but the result is the same :-( I have created/downloaded the branch today the first time. First lines of the output of ./compile.sh:

-- The C compiler identification is GNU 7.1.1
-- The CXX compiler identification is GNU 7.1.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.64.0
-- Found the following Boost libraries:
-- unit_test_framework
-- regex
-- Found PythonInterp: /usr/bin/python (found version "3.6.1") ...

Read more...

Revision history for this message
GunChleoc (gunchleoc) wrote :

Looks like something that GCC7 doesn't like any more. I have pushed a change that will hopefully fix it.

Revision history for this message
kaputtnik (franku) wrote :

Great, now it is compiling.

There is bug though: Attacking a military site with "showing promotions' turned on, an enemy soldier comes out of the military site -> the enemy soldier does not show his promotions. Or is this intended?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Well, if the soldier doesn't have any promotions, they won't be shown. Remember that I switched off showing promotions for soldiers that have none.

I will only change this back if we agree on keeping the hotkeys. In the meantime, if you want to see hotkey behavior only, you'll need to revert to r8371 of this branch.

Revision history for this message
kaputtnik (franku) wrote :

I have tested the showing of census as suggested in the forum: https://wl.widelands.org/forum/topic/2883/

After hitting 'Strg -' 4 times and more i nearly can't read the census information anymore. See attachment.

Laptop display native resolution: 1366x768
Resolution of Widelands: 1280x720

Is it possible to give the text a little bit more size with this zoom factor?

Revision history for this message
GunChleoc (gunchleoc) wrote :

No, because then we will get overlap if the map is crowded with many buildings. So, it's either this or switch it off.

GunChleoc (gunchleoc)
Changed in widelands:
milestone: build20-rc1 → build21-rc1
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: In Progress → Won't Fix
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.