Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Merge player colors from map.properties into Game XMLs

    Map Making
    4
    16
    194
    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.
    • LaFayette
      LaFayette Admin last edited by

      I'm wondering if it makes sense to move the player colors from map.properties into game XMLs.

      For example, we can have this list in map.properties:

      color.British=916400
      color.Italians=236b6a
      color.Americans=5a5a00
      color.Russians=af2828
      color.Germans=5a5a5a
      color.Japanese=e6b42d
      color.Chinese=644664
      color.Neutral=e87112
      color.Impassable=d8ba7c
      

      As XML that could be:

      <playerList>
        <player name="British" color="916400" />
      </playerList>
      
      C ubernaut 2 Replies Last reply Reply Quote 2
      • C
        Cernel Moderators @LaFayette last edited by

        @LaFayette No. That is visual, so it belongs to the skin.

        LaFayette 1 Reply Last reply Reply Quote 0
        • Schulz
          Schulz last edited by

          Yes.....

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

            @Cernel map.properties is not the skin. It's an odd split to have since it's the only thing in map.properties that references a game XML entity (not good).

            It's also kinda odd as different XMLs could have different players and then suddenly you can't control the colors per XML, and/or you wind up defining needless player colors for different XMLs.

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

              @Cernel said another way, map.properties is supposed to be generic to the map files. Game players are not generic to a map, they are specific to a game. Hence, there is game configuration in the map.properties by referencing the players in this way.

              1 Reply Last reply Reply Quote 0
              • ubernaut
                ubernaut Moderators @LaFayette last edited by

                @LaFayette so all the units would then be greyscale, even if they are uniquevisually to a particular player/country?

                LaFayette 1 Reply Last reply Reply Quote 0
                • LaFayette
                  LaFayette Admin @ubernaut last edited by

                  @ubernaut didn't mean to be confusing; it's simply that the player colors in map.properties would be defined in game XML instead of in map.properties.

                  The engine to support old maps would still look in map.properties for player colors, but if it finds player colors in the XML it would use that first.

                  ubernaut 1 Reply Last reply Reply Quote 0
                  • ubernaut
                    ubernaut Moderators @LaFayette last edited by ubernaut

                    @LaFayette i was referring specifically to unit graphics, several maps have totally different graphics for the same unit, bombers being the first to come to mind. 🙂

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

                      Ah. @ubernaut - No plans here to change that (greyscale), only just where you specify the player colors.

                      ubernaut 1 Reply Last reply Reply Quote 0
                      • ubernaut
                        ubernaut Moderators @LaFayette last edited by

                        @LaFayette not on you i am easily confused but if the colors are already embedded in the graphics then how can we consistently set colors in the engine?

                        i swear we've had this discussion in the forums before, maybe it was on nabble, or maybe i'm just being thick. 😛

                        LaFayette 1 Reply Last reply Reply Quote 0
                        • LaFayette
                          LaFayette Admin @ubernaut last edited by

                          @ubernaut There is a hue-shift feature now! I forget exactly what you need to do turn it on, and I also forget where exactly the player colors in map.properties are used.. 😁

                          Regardless of all of those features, the question here is if it makes sense to move the player colors to XML (so that way all data about players will be in the same file).

                          ubernaut 1 Reply Last reply Reply Quote 0
                          • ubernaut
                            ubernaut Moderators @LaFayette last edited by

                            @LaFayette well there are a number of issues with just trying to blanket change the hue of a set of images for one thing not all of the image should be colored in all cases. for another thing, the original image will need to be desaturated first here is an example of what happens when you try to make an already desaturated unit (german) set to the same hue as russia:
                            Screen Shot 2020-09-03 at 12.12.15 PM.png

                            and this is what happens when you try that with a unit that already has a color:

                            Screen Shot 2020-09-03 at 12.13.51 PM.png

                            LaFayette 1 Reply Last reply Reply Quote 0
                            • LaFayette
                              LaFayette Admin @ubernaut last edited by

                              @ubernaut the code to due hue shifting is not a naive hue shift, it takes into account luminosity. I recommend giving it a try, saturated images should hur shift quite nicely. Though, we are getting off topic. AFAIK the player colors in map.properties are not the trigger for hue shifting ( those props have been there for a long time, well before there were hue shifting properties)

                              ubernaut 1 Reply Last reply Reply Quote 0
                              • ubernaut
                                ubernaut Moderators @LaFayette last edited by

                                @LaFayette the 'color' mode i'm using here does the same thing. different colors that are not primary (ie 100% green red or blue) would typically have different luminosities, the germans are coming out darker than the target and the usa units are coming out lighter. anyway, i'm just speaking to the not so obvious side effects of using such a feature. it certainly is good to have as an option. i just think in terms of high quality maps its utility is questionable in my mind. 🙂

                                LaFayette 1 Reply Last reply Reply Quote 0
                                • LaFayette
                                  LaFayette Admin @ubernaut last edited by

                                  @ubernaut just saying that the algorithm used by gane engine for hue shift is not just hue, it's involved, and it has done in cases a great job with well saturated images. IMHO you'd need to try it to really judge.

                                  ubernaut 1 Reply Last reply Reply Quote 0
                                  • ubernaut
                                    ubernaut Moderators @LaFayette last edited by

                                    @LaFayette not sure how i would but regardless even if the thing is using curves to match a gamut it will not be 100% as good an originally colored graphic some information is always lost when you do it it's just a matter of degrees and again often times the unit is not of one hue to begin with so yeah… maybe we've talked this one past death at this point. 😛

                                    1 Reply Last reply Reply Quote 1
                                    • 1 / 1
                                    • First post
                                      Last post
                                    Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums