[PATCH] FleetHeadIcon() for multiple fleets

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
User avatar
cami
Space Dragon
Posts: 411
Joined: Tue Sep 20, 2011 10:32 pm
Location: Halle (Saale)

[PATCH] FleetHeadIcon() for multiple fleets

#1 Post by cami »

Came across this comment recently

Code: Select all

    // select icon(s) for fleet(s), and get a fleet for use later
    TemporaryPtr<const Fleet> first_fleet;
    if (m_fleets.size() != 1) {
        first_fleet = *(fleets.begin());

        // if there are multiple fleets, default to generic fleet icon by
        // passing null pointer (0) to FleetHeadIcon.  TODO: instead, check if
        // all fleets would use the same icon, and if so, use that icon, and
        // only default to generic icon in cases where there are multiple
        // different icons for the various fleets being represented
        m_head_icon = FleetHeadIcon(TemporaryPtr<Fleet>(), size_type);
        int num_ships = 0;
        for (std::vector<TemporaryPtr<const Fleet> >::const_iterator it = fleets.begin(); it != fleets.end(); ++it)
            num_ships += (*it)->NumShips();
        m_size_icon = FleetSizeIcon(num_ships, size_type);

    } else if (!m_fleets.empty()) {
        first_fleet = *fleets.begin();
        m_head_icon = FleetHeadIcon(first_fleet, size_type);
        m_size_icon = FleetSizeIcon(first_fleet, size_type);
     }
and thought it would be a nice detour from the refactoring to make a small, self-contained and more visible change. So here's the patch. It treats multiple fleets exactly the same as a single fleet, only looking at the ships within the set of fleets. I tried to be smart about the icon selection, giving threats some priority (e.g. a scout fleet and a battleship fleet will now display as a battle icon instead of a scout icon). Too much ambiguity (e.g. monsters and player ships) is still resolved by showing a scout icon.

Edit: made a slightly modified version that always displays the scout icon when there are monster and non-monster fleets. I couldn't find a situation where this would actually occur (fleets of different empires are displayed separately in all cases I could produce), but if there are, that version might be preferable.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

[The extension patch has been deactivated and can no longer be displayed.]

Last edited by cami on Wed Feb 26, 2014 9:42 pm, edited 2 times in total.
Yesterday, we were still on the brink. Fortunately, today we have come one step further.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12770
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] FleetHeadIcon() for multiple fleets

#2 Post by Geoff the Medio »

Committed.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#3 Post by Dilvish »

nice! :)
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#4 Post by Dilvish »

One thing I've noticed since this went in -- the AI colony ships, which are generally armed, wind up being given a scout icon. I think either the colony icon or the warship icon could be reasonable in that case, and probably lean towards the warship.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#5 Post by MatGB »

I'd rather colony myself-it also applies to outposts, a warship is a warship, an AI seeder/outposter isn't a warship, it's got a basic laser, generally, and shows up separately, given that the AI ships are going to be more common in most games than player ships, why have colony/outpost icons if not use them?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
cami
Space Dragon
Posts: 411
Joined: Tue Sep 20, 2011 10:32 pm
Location: Halle (Saale)

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#6 Post by cami »

I'm also not happy with some edge cases. Can the game actually be smart enough to pick a proper icon? Situation is clear when only arms, troops, colonists or outpost modules are present. But as soon as there are multiples, situation becomes confusing: which icon should get preference? Does a small laser make a colony ship a war fleet? Does an additional colony ship make a warfleet a colony fleet?

I think we'll only get out of this by making stackable icons. Something akin to the attached one. Legend:
Light red: colony module present
Dark red: colony or outpost module present
Magenta: colony, outpost or troop module present
White: colony, outpost, troop or weapons module present
Yellow: colony or weapons module present
Green: weapons module present
Blue: Troops module present
Attachments
fleet-icons.png
fleet-icons.png (2.6 KiB) Viewed 2093 times
Yesterday, we were still on the brink. Fortunately, today we have come one step further.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#7 Post by MatGB »

I'd prioritise based on strategic threat. A scout fleet can be ignored, a warship or fleet can be either fought or ignored, but a colony ship or troop ships are actual strategic threats.

My preference order, the first to appear on this list should be the icon: troops, colony, outpost, warship, monster, scout.

And if on own, any ship with a troop part shoudl show as troops, colony pod, etc, taking the same priority order for edge cases where one ship has both (I can't imagine making such a design but I've no doubt others will).
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#8 Post by Dilvish »

Matt's priorities are fine with me. It does look like the stackable icons could cover the troop,colony,outpost,warship portion fine and provide more information that merely prioritizing the existing icons. I would be interested in seeing how it worked out with troop pods also triggering the "yellow" portion so that the standalone troop icon would be pretty much like now, but if weapons were added then (hopefully) the extra "green" tips would visibly indicate that. Just to clarify, I am presuming that these colorings are just to assist our discussion of the icon portions, the actual end icon color would be monochrome as now, determined by empire. And then if none of those ship types are present then the Monster, scout icon priorities could be followed.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
cami
Space Dragon
Posts: 411
Joined: Tue Sep 20, 2011 10:32 pm
Location: Halle (Saale)

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#9 Post by cami »

A mockup stacked fleet icon with al four types.

Edit: changed stacking order to put troops on top in order to make them more prominent (doesnt look as nice, but I guess designers may find better optiosn anyway).
Attachments
Troops on top
Troops on top
fleet-icon-stacked.png (802 Bytes) Viewed 2082 times
Original
Original
fleet-icon-stacked.png (812 Bytes) Viewed 2084 times
Yesterday, we were still on the brink. Fortunately, today we have come one step further.

User avatar
cami
Space Dragon
Posts: 411
Joined: Tue Sep 20, 2011 10:32 pm
Location: Halle (Saale)

Re: [RESOLVED] FleetHeadIcon() for multiple fleets

#10 Post by cami »

Patch, icon files and ingame screenshot showing the large (fleet wnd) and small (map wnd) versions together with the fleet size indicator.
Attachments
fleet-icon-stacked-screenshot.png
fleet-icon-stacked-screenshot.png (154.43 KiB) Viewed 2082 times

[The extension patch has been deactivated and can no longer be displayed.]

fleet-icon-stacked.zip
(9.58 KiB) Downloaded 137 times
Yesterday, we were still on the brink. Fortunately, today we have come one step further.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12770
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] FleetHeadIcon() for multiple fleets

#11 Post by Geoff the Medio »

With all those different sub-icons stacked together, it seems a bit... noisy? for me... Hard to readily see what's being represented...

User avatar
cami
Space Dragon
Posts: 411
Joined: Tue Sep 20, 2011 10:32 pm
Location: Halle (Saale)

Re: [PATCH] FleetHeadIcon() for multiple fleets

#12 Post by cami »

I think it's still better than using the same icon in all cases. I tried it in practice and it is extremely rare that you really have all types in the same spot, and even then you get quickly accustomed to the combined shapes and don't try to tell apart the individual components anymore. I assume that a designer can make the icons stack better, but the general approach of stacking proved very useful for me. It eleminated the "click through the fleets to check for X" almost completely (still had to do it at times to find out the colony species).
Yesterday, we were still on the brink. Fortunately, today we have come one step further.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [PATCH] FleetHeadIcon() for multiple fleets

#13 Post by eleazar »

cami wrote:I think it's still better than using the same icon in all cases. I tried it in practice and it is extremely rare that you really have all types in the same spot, and even then you get quickly accustomed to the combined shapes and don't try to tell apart the individual components anymore. I assume that a designer can make the icons stack better, but the general approach of stacking proved very useful for me. It eleminated the "click through the fleets to check for X" almost completely (still had to do it at times to find out the colony species).
There's a point where in trying to convey too much information, you convey less information, by making it too hard to comprehend. This IMHO reaches that point.
Look at the icon actually in the galaxy window. It is a confusing mess. Yeah you can probably figure it out if you squint and think about it, but that defeats the purpose. This is supposed to provide at-a-glance information. If you are going to spend any time and attention, you might as well open the fleet window, and get detailed information.


Icon selection for fleets and individual ships should use the same logic. These are the priorities that make sense for me:
  • Does it have a Colony part? Display Colony, else
    Does it have an Outpost part? Display Colony, else
    Does it have an Troop part? Display Troop, else
    Is it a Monster Hull? Display Monster, else
    Does it have weapons? Display Warship, else
    Display Scout
The point here is to prioritize the most rare/vulnerable/valuable. Or in the case of scouts, which are a category of exclusion: "no weapons, and no other special stuff" rule everything else out. Colony/Outpost/Troop ships may often have an armed escort, but you usually distinguish the group from your other pure war-groups by the presence of the specialist ship. I prioritized colonies over outposts, because they are more powerful versions of the same thing, and both over troops, because they are usually much rarer.

And note that the logical prioritization would be in some ways different for your ships/fleets and those of enemies. These priorities are optimized for the player's fleets/ships, because that's what he will spend the most time with, and it is possible that in the future these details may not always be shown for non-allied fleets.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: [PATCH] FleetHeadIcon() for multiple fleets

#14 Post by Dilvish »

It seems to me that almost all of what makes the stacked icon "busy" relative to the current icons is the outline between various parts of the stacking -- I wasn't expecting that from the initial discussion.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
cami
Space Dragon
Posts: 411
Joined: Tue Sep 20, 2011 10:32 pm
Location: Halle (Saale)

Re: [PATCH] FleetHeadIcon() for multiple fleets

#15 Post by cami »

The disagreement between "the most valuable" and "the most dangerous" already shows there is no consistent way to prioritize. Also note that the current icons are just a mockup, you probably agree there can be much better designs with intuitive look and much less clutter.

I really had the exact same concernsas you mention, and tried it out of curiosity, to my own surprise finding it helps a lot and doesnt hurt at all; that's just why I'm recommending you to test it in a realistic scenario before judging. Really try to defeat an opponent in a 200-300 turn game. You will notice it is very helpful when this information is not hidden, particularily when you do have many fleets, particularily moving fleets, on the window. In most cases, you will have at most two icons stacked, sometimes two plus weapons (which do barely change appearance), and you can quickly glance the situation much better than with generic icons or even completely overridden ones. This is partially also because our brain is trained to recognize objects partially hiding each other.

Also note that prioritized Icons are easy to manipulate: add a single troop part to your colony ship, bang suddenly its a trooper. in PvP, this will be exploited and make the icon priority actually a disguise instead of information. Icon priorities are even worse than generic icons in that case.
Yesterday, we were still on the brink. Fortunately, today we have come one step further.

Post Reply