TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    AFTERMATH STATISTICS WITH GAME INFO/ACHIEVEMENTS

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    35 Posts 7 Posters 8.5k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • djabwanaD Offline
      djabwana
      last edited by

      This is also closely related to this post about improving the message when victory conditions are met.

      Thanks for the tip about enabling the beta features to see the stats. Here's what the current iteration looks like (I agree a great start!)
      43725586-d7d3-4ace-b5e3-d5672e3f0b8f-image.png

      1 Reply Last reply Reply Quote 0
      • LaFayetteL Offline
        LaFayette Admin
        last edited by

        I think we may have neglected to remove the feature flag for the statistics, looks like that could be done to make this generally available.

        1 Reply Last reply Reply Quote 0
        • djabwanaD Offline
          djabwana
          last edited by

          I would like to compute the backing data off the UI thread b/c it does freeze the game when you load it. I would also like to use the faction's colors from the map .properties instead of assigning random colors. I'll take a peek and see if I can do it

          1 Reply Last reply Reply Quote 2
          • djabwanaD Offline
            djabwana
            last edited by djabwana

            Alright I've made some progress and will open a PR soon. I also want to show % change in addition to absolute value and will try to add that. This is now using the faction's colors from the map, which is "auto assigning" a color for the Alliances, which isn't ideal... I was thinking about splitting aggregate alliance data up from individual factions into separate charts (or a toggle) anyway.

            2d347270-14e7-40ff-a606-344771caafa9-image.png

            C 1 Reply Last reply Reply Quote 3
            • SchulzS Offline
              Schulz
              last edited by

              I liked the idea. But still not sure which colours would represent best the alliances? Maybe mix of all alliance member's colours? Once time i had tried it which resulted very unique colours.

              1 Reply Last reply Reply Quote 0
              • LaFayetteL Offline
                LaFayette Admin
                last edited by

                There is a hash function for assigning player colors that are otherwise unspecified. The same function could potentially be used for alliances which would at least give a consistent color.

                1 Reply Last reply Reply Quote 1
                • C Offline
                  Cernel Moderators @djabwana
                  last edited by Cernel

                  I think this is a neat feature to develop. Maybe it should pop-up automatically after you accept the victory notification.

                  @djabwana said in AFTERMATH STATISTICS WITH GAME INFO/ACHIEVEMENTS:

                  "auto assigning" a color for the Alliances, which isn't ideal...

                  No idea if possible, but I would have it as a dashed line without spaces between the dashes, where each dash corresponds to the faction turn within the round shown by the X axis and is coloured as that faction (so, the alliance line would be a dashed sequence of all colours of the alliance factions).

                  By the way, the X axis should start as 0 and have value 1 at the end of the first round (not at the beginning), if it is continuous, or having the number 1 in the middle of the space representing the round, if it is discrete (Roman numerals would also strongly hint discreteness).

                  I also suggest fixing the bottom-left corner of the graphic always on the 0 (so you never have negative values and you don't cut any positive space, no matter if unused (as, eventually, some faction is likely to get killed, going to 0, anyway)).

                  Finally, you should apply the "Impassable" colour as background (on the assumption that the map-maker got it distinctive enough) or somehow determine a good colour based on the colours: you cannot assume maps not having the white (or next-to white) colour for at least one faction, as indeed some of them do. I realize that not every map has the impassable colour.

                  @djabwana said in AFTERMATH STATISTICS WITH GAME INFO/ACHIEVEMENTS:

                  I was thinking about splitting aggregate alliance data up from individual factions into separate charts (or a toggle) anyway.

                  I think best would be a toggle for having, on the same chart, only the factions, only the alliances or both at the same time (so not really a toggle, as there would be 3 options). In theory, I could make a game with 100 factions per alliance, where each faction line would be pushed so much on the bottom to become almost indistinguishable, so I think the default should be either factions-only or alliances-only.
                  Of course, you can have alliances having only one faction. In this case, they should figure in both the factions-only and the alliance-only displays, but they need to be shown only once, as faction/alliance, when showing both. This matter is also relevant for when you happen to have only one faction remaining on the map for the alliance (you will have to decide whether the alliance or the faction overlaps, so hides, the other).

                  1 Reply Last reply Reply Quote 0
                  • djabwanaD Offline
                    djabwana
                    last edited by

                    Thanks everyone for the feedback!

                    • I switched out the "fixed" color palette to one from https://colorbrewer2.org/
                    • I changed the random assignment to be a fixed brightness
                    • I realized map designers can assign an alliance color in map.properties so I don't think we need to get fancy- map makers can pick a color for the alliance if they don't like the auto assigned one (which should be more distinguishable and aesthetic now)
                    • Data loads off the UI so you can interact with the UI while it's loading
                    • You can toggle players, alliances, or both and both is split between 2 axes
                    • The window itself is no longer a JOptionPane but a normal JFrame that can be resized
                    • I took it out of beta in the menu

                    My progress is here:
                    https://github.com/jdimeo/triplea/tree/game-stats-rework
                    Still have to clean up checkstyle stuff before I can open the PR

                    Loading off UI thread:
                    8a63fb6d-1e35-417e-b0ff-fe490044b81a-image.png

                    Players TUV:
                    eddd9e61-e262-4b26-afbb-ad480bc2cab4-image.png

                    Alliances Production: Revolutionaries came from map.properties whereas the other two were auto-assigned.
                    93f8b343-9362-49df-91e8-f989f7d10194-image.png

                    PUs for both: Kinda a mess, but if you don't have two y axes the lines of the players will always get smashed by the alliances
                    2de3faf4-2820-4ccf-bf97-3a3192c503fd-image.png

                    C 1 Reply Last reply Reply Quote 0
                    • djabwanaD Offline
                      djabwana
                      last edited by

                      @Cernel I'm not sure if x = 1 means "start of game" or means "after the first round". I'm focusing on the charting aspect and not the data collection. Maybe someone else can weigh in on that. I'm pretty sure it's what we want though b/c I see that USA has 0 PUs which is true at the start of the game, so I think 1 does really mean 0 in the sense that you were thinking. I did force Y to zero though for all charts.

                      C 1 Reply Last reply Reply Quote 0
                      • djabwanaD Offline
                        djabwana
                        last edited by

                        More generally though, I would love to pop this up at the end of each round and also work it into a more "newspaper" format with notable battles, or objectives achieved, or VCs captured, etc. that round as a recap and a way to celebrate achievements. So I also propose we rename this to "Round Summary" or something to start going in that general direction instead of a more "Game Statistics" direction (though I love the current charting and it should definitely be a part of this long term!)

                        1 Reply Last reply Reply Quote 1
                        • C Offline
                          Cernel Moderators @djabwana
                          last edited by Cernel

                          @djabwana Yes: I'm pretty sure the "1" on the Axis means the start of the first round. To make it clearer, I suggest either moving the numbers on the centre of the periods (so, for example, the "1" would be in the middle of where now there are the "1" and the "2") or move to an actual continuous enumeration, in which case the current "1" should be "0", the current "2" should be "1" and so on.

                          Either can be used. For example, I believe we use continuous for persons years (so I have 1 year 1 year after I was born, not in the moment I was born) and discrete for history years (so it has been 2,000 years when the year turns 2001, not when the year turns 2000, so one which was born in the year 2000 is not a so-called "millenial", for example, because the year 2000 is the last year of the past millenium).

                          1 Reply Last reply Reply Quote 0
                          • LaFayetteL Offline
                            LaFayette Admin
                            last edited by

                            @djabwana FWIW a joy of Swing is in theory it's bad practice to use multiple JFrames. In particular and in practice we saw problems in TripleA where on some systems and some JDK versions new Jframes appeared behind the game JFrame. That behavior was not consistent, but on those systems it typically was and certainly generated a number of bug reports.

                            • https://github.com/triplea-game/triplea/issues/6248
                            • https://github.com/triplea-game/triplea/issues/4954
                            C djabwanaD 2 Replies Last reply Reply Quote 0
                            • C Offline
                              Cernel Moderators @LaFayette
                              last edited by

                              @LaFayette Off-topic, but the problem has never gone away. Currently, if you open the Notes or Unit Help window, it will be instantly hidden behind the map as soon as the focus get to it (typically, for someone else starting a battle). Normal users will likely just think that it has disappeared so will proceed opening a second one and so on.

                              Reference:
                              https://github.com/triplea-game/triplea/issues/8607

                              LaFayetteL 1 Reply Last reply Reply Quote 0
                              • LaFayetteL Offline
                                LaFayette Admin @Cernel
                                last edited by

                                @Cernel The cause is likely the same. There are several windows created as new frames still.

                                1 Reply Last reply Reply Quote 0
                                • LaFayetteL Offline
                                  LaFayette Admin
                                  last edited by

                                  My 2 cents, having the 'x' axis start as '1' is nice to avoid the gap on the left hand side. Games do start at round 1, just my 2 cents.

                                  Nice work otherwise, the progress looks good.

                                  1 Reply Last reply Reply Quote 1
                                  • C Offline
                                    Cernel Moderators @djabwana
                                    last edited by

                                    @djabwana said in AFTERMATH STATISTICS WITH GAME INFO/ACHIEVEMENTS:

                                    Thanks everyone for the feedback!

                                    • I switched out the "fixed" color palette to one from https://colorbrewer2.org/
                                    • I changed the random assignment to be a fixed brightness
                                    • I realized map designers can assign an alliance color in map.properties so I don't think we need to get fancy- map makers can pick a color for the alliance if they don't like the auto assigned one (which should be more distinguishable and aesthetic now)
                                    • Data loads off the UI so you can interact with the UI while it's loading
                                    • You can toggle players, alliances, or both and both is split between 2 axes
                                    • The window itself is no longer a JOptionPane but a normal JFrame that can be resized
                                    • I took it out of beta in the menu

                                    My progress is here:
                                    https://github.com/jdimeo/triplea/tree/game-stats-rework
                                    Still have to clean up checkstyle stuff before I can open the PR

                                    Loading off UI thread:
                                    8a63fb6d-1e35-417e-b0ff-fe490044b81a-image.png

                                    Players TUV:
                                    eddd9e61-e262-4b26-afbb-ad480bc2cab4-image.png

                                    Alliances Production: Revolutionaries came from map.properties whereas the other two were auto-assigned.
                                    93f8b343-9362-49df-91e8-f989f7d10194-image.png

                                    PUs for both: Kinda a mess, but if you don't have two y axes the lines of the players will always get smashed by the alliances
                                    2de3faf4-2820-4ccf-bf97-3a3192c503fd-image.png

                                    I don't understand how the Germans can have more PUs than the Central Powers. Aren't the Central Powers an alliance comprising the Germans?


                                    If not taking my suggestion of using the Impassable colour as background, I think it would be usually better having a black background, turning white the Axis, the number and everything else that is black now, as I think it is more unlikely to have a black or almost black ownership colour than a white or almost white one (for example, Italians are pure white in New World Order). Of course, there can easily be maps for which a white background would be better, instead. I guess one could have the program choosing one or the other depending on what colours come the closest to pure white and pure black and which one of the two is the absolute closest (of course, this won't work for a map that have a player having a pure white colour code and another player having a pure black colour code).


                                    Can you please let me know what is the current use of assigning a colour code to the Alliances if I'm understanding correctly it is already something one could define in the "map" properties? I'm not sure of any case in which this colour would currently display anywhere.

                                    djabwanaD 1 Reply Last reply Reply Quote 1
                                    • djabwanaD Offline
                                      djabwana @LaFayette
                                      last edited by

                                      @LaFayette Well yes, that's another change I would like to make- if I only had a week to devote to this! I would like to get rid of almost every single modal and popup window in the game. Like we do with the stats and info on the right side panel, but even more/better. It certainly should not be a JOptionPane though, but I can look into making the settings better with force to top, correct modality, etc.

                                      1 Reply Last reply Reply Quote 0
                                      • djabwanaD Offline
                                        djabwana @Cernel
                                        last edited by djabwana

                                        @Cernel It's not that I'm not taking your suggestion r.e. background color- I just have limited time to implement some of my/our ideas... what you're bringing up here seems like very low priority compared to other things

                                        Not sure what the current use of assigning a color to an Alliance beyond the fact that I use it here. Not sure where else that does or doesn't happen elsewhere in the game.

                                        Oh and yes- Germans are part of Central Powers. There are two different Y axes when you plot them all together which is why it can appear to be less (which is why I don't think it's very useful to put players and alliances on the same chart)

                                        T ubernautU 2 Replies Last reply Reply Quote 0
                                        • T Offline
                                          tinfoil666 @djabwana
                                          last edited by

                                          @djabwana Would it be possible to have a toggle feature to see:

                                          • just the players' stats,

                                          • just the factions' stats,

                                          • the current 'see everything'?

                                          Alternatively, allow the user to click on each item in the legend to toggle it on or off (default to 'all on'). That way, each user can custom-view whatever they want on the fly, without the dev having to predict what they will want.

                                          I find the graph very odd on the Feudal Japan map in particular, as the graph is dominated by a single non-playable faction. Having the simple choice to turn that one off with a click would make the rest much more visible, if the scale re-sets itself for the re-draw.

                                          1 Reply Last reply Reply Quote 1
                                          • ebbeE Offline
                                            ebbe
                                            last edited by

                                            Great to see so much response and action on this topic! thank you Triple Code Wizards

                                            1 Reply Last reply Reply Quote 1

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums