Page MenuHomeWildfire Games

reorganize selection textures
Needs ReviewPublic

Authored by Nescio on Dec 22 2019, 11:57 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

This patch is basically a follow-up to D889/rP20374 from over two years ago.

This one does the following:

  • introduce some oblong selection shapes, as briefly discussed here on the forums.
  • because there are many more shapes than sizes, the textures are now located as size/shape instead of shape/size; this is to easily accommodate future additions
  • redrawn existing selection textures from new svg files to ensure all have the same line thickness
  • also added a 128x128 star
  • circle and square are now called ellipse and rectangle (precise language)
  • updated templates accordingly
  • removed numerous unnecessary <Selection> entries

Overview of usage per texture:

  • 128x128/
    • arrow: champion infantry
    • ellipse: birds, trees, infantry, female citizens, slaves, some traders
    • octagram: territory pull
    • plus: healer
    • rectangle: —
    • rhombus: —
    • rounded_rectangle: polybolos, scorpio
    • star: hero infantry and healer
  • 128x256/
    • cartouche: catafalque
    • elllipse: cavalry, dog, fauna, fishing boats, some traders
    • rectangle: —
    • rounded_rectangle: oxybeles, lithobolos, rams
  • 128x512/
    • cartouche: —
    • ellipse: shark, whale, ships
    • rectangle: —
    • rounded_rectangle: fireraiser
  • 256x256/
    • arrow: champion cavalry and elephant
    • ellipse: elephant archer, worker elephant
    • octagram: —
    • plus: —
    • rectangle: —
    • rhombus: —
    • rounded_rectangle: ballista, siege tower
    • star: hero cavalry and elephant

To be done later in a future patch, after mods are updated accordingly:

  • move 1024x1024_aura.png and *_mask.png
  • delete the old selection shape folders (arrow/, circle/, hash/, octagram/, plus/, rhombus/, square/, and star/, but not auras/) and their now deprecated contents

PS No 1:3 etc sizes are introduced, because Atlas does not accept textures with dimensions that are not powers of two. As a consequence there is a small amount of stretching for some specific units, e.g. the bulky Celtic warbarge.
PPS svg source files are located here. As you can see, there are many more available there not included in this patch. These selection textures are really small and cheap (only a few kb each), so more shapes could be added as well, to have more assets for future mods, if desired.

Test Plan

Check for mistakes and typos. Implement the patch. In case phabricator can't handle the images (D889#38774), here's a zip with the textures:


Open atlas, then place some entities and select them to see the new selection textures show up correctly.

Event Timeline

Nescio created this revision.Dec 22 2019, 11:57 PM
Owners added a subscriber: Restricted Owners Package.Dec 22 2019, 11:57 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/868/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1384/display/redirect

Nescio updated this revision to Diff 10753.Dec 23 2019, 12:11 AM
Nescio edited the summary of this revision. (Show Details)

forgot 256x256/rounded_rectangle

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/869/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1385/display/redirect

Nescio edited the summary of this revision. (Show Details)Dec 23 2019, 12:20 AM

Could you remind me? Why we have a selection mask as a separate texture?

Could you remind me? Why we have a selection mask as a separate texture?

Simple answer: that's how it's done. I suppose it looks bad without.
Techical answer: I don't know why.

Stan added a comment.Jan 6 2020, 10:30 PM

Can you split the cleanup from this patch?

What exactly?

Stan added inline comments.Jan 6 2020, 10:42 PM
binaries/data/mods/public/simulation/templates/gaia/fauna_camel.xml
18

Stuff like this?

Nescio added inline comments.Jan 6 2020, 10:50 PM
binaries/data/mods/public/simulation/templates/gaia/fauna_camel.xml
18

Currently basically all animals have a 1:2 footprint, but some use the 128x128 circle, others the 256x256 circle.
This patch introduces oblong shapes, so all animals can use the new 128x256 ellipse, which looks better.
Because of that stuff like this becomes both unnecessary and potentially problematic, which is why these lines are removed.

Stan added a comment.Jan 6 2020, 10:52 PM

I see. Okay So I just need to figure out a way to apply this patch. I'll try tomorrow.

Doesn't arc patch D2503 work for you?

Stan added a comment.Jan 6 2020, 10:57 PM

Nope, I probably need to patch arc on Windows...

Then how do you try out other patches?

Stan added a comment.Jan 6 2020, 11:31 PM

Then how do you try out other patches?

I usually download raw diffs and sometimes arc works :D

In case phabricator can't handle the images (D889#38774), here's a zip with the textures:

Nescio edited the test plan for this revision. (Show Details)Feb 15 2020, 1:54 PM
Nescio edited the test plan for this revision. (Show Details)
Stan added a comment.Feb 15 2020, 4:29 PM

I just tried. I think there is something wrong with the scorpio, maybe it needs a specific size. I used the unit_demo maps I haven't checked all the footprints yet.

Nescio updated this revision to Diff 11367.Feb 15 2020, 6:13 PM
Nescio edited the summary of this revision. (Show Details)

It turns out there are a number of units with square footprints that ought to be oblong:

  • about half of all traders
  • maur_elephant_archer_b.xml
  • maur_support_elephant.xml
  • ptol_siege_polybolos_packed.xml
  • rome_siege_ballista_packed.xml
  • rome_siege_scorpio_packed.xml

Correcting footprints belongs in a different patch. Therefore it's necessary to insert square selection textures for now.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1772/display/redirect

Stan added a comment.Feb 16 2020, 10:11 AM

Also shouldn't this patch delete other textures?

Also shouldn't this patch delete other textures?

That would break A24 mods, so I assumed it would be better to update selection textures here, then correct mods, and afterwards do another patch to delete the old textures. But if you prefer to delete them immediately, I could include that in this patch.

Stan edited reviewers, added: Restricted Owners Package; removed: Stan.Sat, Mar 7, 3:50 PM