Page 1 of 4

[patch] Graphical Combat Summary

Posted: Fri Oct 03, 2014 7:53 pm
by Mitten.O
After the extended game of battleship that the sdl migration is, I wanted to take a break and do some fun GUI stuff.

Since there is very little tactical depth for now, the most interesting information after a battle is how many of mine survived and how many of theirs. Also the resulting healths of the surviving ships are of interest. I made a graphical combat summary that displays all this information at a glance, with plenty of possibilities to expand it with more information. It is intended to make sense, so please take a look at the screenshots in this post before reading the more detailed explanation in the next one to get a feel of how much you feel you can get out of the summary without explanation.

Breaks savegame compatibility, since the current health in the past needs to be stored to make it possible to look at combat reports of past turns.

BTW. There is a segfault on exit not caused by this, since it appears on master.

Re: [patch] Graphical Combat Summary

Posted: Fri Oct 03, 2014 7:54 pm
by Mitten.O
Explanation: the x axis is a fleet health bar. The x axis scale is shared between empires. The health is broken into contributions of each ship in the fleet. The dead are collected to the right, where their width is their max health. The bars of individual ships show their max health in red and current health in green. The y axis scale is not shared between empires. This is open to discussion, but the main problem is the huge health of monsters scaling the others too low.

Re: [patch] Graphical Combat Summary

Posted: Fri Oct 03, 2014 8:14 pm
by Geoff the Medio
Mitten.O wrote:It is intended to make sense, so please take a look at the screenshots in this post before reading the more detailed explanation in the next one to get a feel of how much you feel you can get out of the summary without explanation.
I have no idea what I'm looking at... except that the fleet health text should probably be next to the name it applies to, rather than slightly above the next row's name.

Re: [patch] Graphical Combat Summary

Posted: Sat Oct 04, 2014 11:43 am
by Mitten.O
I labeled the other axis and added tooltips to the bars.

EDIT: Missing change in patch.

Re: [patch] Graphical Combat Summary

Posted: Sat Oct 04, 2014 3:36 pm
by Sloth
I like the idea of being able to view a combat report.
Mitten.O wrote:Explanation: the x axis is a fleet health bar. The x axis scale is shared between empires.
If i understand it correctly, the length of the x axis is the sum of both fleet health'. Wouldn't it be better for it to be the maximum of the two fleet health'?
That would lead to less empty space.

Re: [patch] Graphical Combat Summary

Posted: Sat Oct 04, 2014 6:15 pm
by Mitten.O
The x axis is actually scaled to fit the maximum of their full healths. That makes sure there is always room for the dead, whose widths are based on their maximum health to see quickly how big ships were killed.

Re: [patch] Graphical Combat Summary

Posted: Tue Oct 07, 2014 12:29 pm
by em3
I'd drop the axes, especially the horizontal one, as it is not, in fact, an axis in mathematical sense. For one, it does not really represent fleet health (but is labeled as such).

I'd also suggest that all health bars should have their width proportional to max health, not current health.

Re: [patch] Graphical Combat Summary

Posted: Tue Oct 07, 2014 5:04 pm
by Dilvish
em3 wrote:I'd drop the axes, especially the horizontal one, as it is not, in fact, an axis in mathematical sense. For one, it does not really represent fleet health (but is labeled as such).
But if we drop an axis from a 2-D chart won't we be left with a simple line or single bar? :lol: Since the total span of each set of bars (surviving ships & destroyed ships) is directly scaled from a respective sum of ship healths (current healths for surviving ships and max health for destroyed ships), I'm puzzled by the assertion that it is not a mathematical axis-- could you explain the assertion a bit more? Does it help you to explicitly discuss the 'X' axis instead as two axes, an X1 axis extending from the left and an X2 axis extending from the right? I haven't looked at how this plotting is actually being done, but if I were doing it with matploltlib that X1 and X2 setup is how I'd do it.

If what you meant was to drop the axis label (s), by itself that doesn't seem an improvement to me. Since both X1 and X2 are measuring cumulative ship health, and have the same scale, the general idea of having a single label seems reasonable, though perhaps not ideal here, and I'd agree that what is there so far seems to fall short of well conveying the full meaning in this case. I'm not sure if it would reasonably fit it into available space, but here is a proposal: Call them all Ships, not Units, even if that sounds a tad odd for monsters. Take the "Fleet Health X/Y" label and combine it with the empire name, across the top. One the left side, instead of an empire-colored "Unit Health" in the middle, make it a red "Ship Damage" at the top and a green "Ship Health" at the bottom, and use that same red color for the label, the red portion for surviving ships, and the red fill for destroyed ships. Below the horizontal axis, if there are any surviving ships then on the left side have a green "Surviving Ships" and if there are any destroyed ships then on the right side have a red "Destroyed Ships".

Re: [patch] Graphical Combat Summary

Posted: Mon Oct 13, 2014 8:12 am
by Mitten.O
em3 wrote:I'd also suggest that all health bars should have their width proportional to max health, not current health.
Doing that would make the x axis not be an axis. There would be no way to see the current health of the fleets compared to each other without reading numbers.

The units can be ships, monsters or even planets. I agree that unit is a bit weird, but "ship" just does not cover all the things.

I combined the header with the x label as suggested and added a label for the dead units.

On more detailed labeling of the y axis: I don't think it is unreasonable to expect the user to understand that a bar that is partly red and partly green means that the green is health that is left. This is pretty universal symbology here. There is even a label that explicitly says the bar is talking about health. On top of that, there are the tooltips.

I drew a fake cursor and tooltip on this screenshot, because both fail to be visible in the screenshot, since screenshotting takes focus away from the window.

Re: [patch] Graphical Combat Summary

Posted: Mon Oct 13, 2014 10:40 am
by em3
Mitten.O wrote:
em3 wrote:I'd also suggest that all health bars should have their width proportional to max health, not current health.
Doing that would make the x axis not be an axis. There would be no way to see the current health of the fleets compared to each other without reading numbers.
Ah, yes. Looking at it again I see, that the rectangles sum up to the health of the fleet. So the x axis label does make sense, after all. My mistake.

Other suggestion - instead of "green/red" use "empire color/darkened empire color".

Re: [patch] Graphical Combat Summary

Posted: Mon Oct 13, 2014 11:17 am
by Mitten.O
em3 wrote:Other suggestion - instead of "green/red" use "empire color/darkened empire color".
I thought of something like that, but I feel the red/green makes it more obvious that they are health bars. It was the color scheme which made me think it would be ok to not even label the y axis, but I labeled it after it was found confusing without it. I still think the colour scheme together with the tooltips should be enough, but I have the label there just in case.

EDIT: What would you think of making the arrows have the empire colour?

Re: [patch] Graphical Combat Summary

Posted: Mon Oct 13, 2014 1:57 pm
by em3
Mitten.O wrote:
em3 wrote:Other suggestion - instead of "green/red" use "empire color/darkened empire color".
I thought of something like that, but I feel the red/green makes it more obvious that they are health bars.
That's highly subjective, I guess.
EDIT: What would you think of making the arrows have the empire colour?
I rather like the white of axes as a recurring separator and would vote for keeping it that way.

Re: [patch] Graphical Combat Summary

Posted: Thu Nov 06, 2014 4:26 pm
by Dilvish
So, Geoff, how is this last version looking to you? I am finding this to be a helpful display.

Re: [patch] Graphical Combat Summary

Posted: Thu Nov 06, 2014 4:35 pm
by Geoff the Medio
Dilvish wrote:So, Geoff, how is this last version looking to you?
From the last posted screenshot, I don't know what the width of the bars means.

I also wonder what happens if there are more than two empires (including neutrals) in a battle.

Re: [patch] Graphical Combat Summary

Posted: Thu Nov 06, 2014 8:29 pm
by Dilvish
Starting with your second concern first, since it's the simplest to answer:
Geoff the Medio wrote:I also wonder what happens if there are more than two empires (including neutrals) in a battle.
A graph is provided for each empire involved in the combat (and each graph indicates the respective empire); they are all stacked vertically.
From the last posted screenshot, I don't know what the width of the bars means.
Hmm, yes, there should be some explanation in a relevant pedia article somewhere; my feeling is that trying to put a more explicit explanation of that particular aspect on the graph itself would be more clutter than it is worth. The significance of the bar widths is somewhat intuitive and I think can also be reasonably gleaned from use over time with reference to the tooltips for each bar-- the width for surviving ships/units is proportional to their current health and so gives a graphical indication of how much each survivor contributes to the overall remaining health of their fleet; the width for dead ships is proportional to their max health and so gives some graphical indication of the significance of the ships killed. (Of course there could be different ways of assessing and showing significance, this is just one reasonable way.) It seems to me that these are nuanced, noncritical, helpful indicators and better than just having each bar be the same fixed width even if the meaning may initially be merely suggestive and not entirely obvious.