vasl-developers / vasl

Virtual Advanced Squad Leader
http://vasl.info/
GNU Lesser General Public License v2.1
65 stars 27 forks source link

Using SVG for VASL Discussion #627

Open BigAl737 opened 4 years ago

BigAl737 commented 4 years ago

I'm opening this topic to record a history of discussion concerning SVG file format implementation into VASL. An older closed thread (#218) provides a little more history.

So what do we gain by using SVG?

To answer this I ran a test, the results of which are in the screen shot below (double click the image to get full clarity).

The top row is normal VASL using a png image for the basic piece and VASSAL handles the rotations.

The middle row uses an SVG image for the basic piece and VASSAL handles the rotations.

The bottom is an SVG image for each rotation orientation using an added Layer trait. VASSAL is NOT handling the rotations. However, all the rotated images in this third example that you see are generated with the removal of the ruCTtur prototype. This is important to point out because with the inclusion of the ruCTtur prototype, VASSAL would handle the rotations. It's interesting to note that the SVG image for each orientation maintains better clarity than the above examples. If VASSAL handled the rotations (i.e. with the inclusion of the ruCTtur prototype), the results were almost identical to the middle row.

As expected, clarity is maintained with SVG images, even when zooming in. What I didn't expect is the improved clarity attained even when rotated through the use of a Layer trait.

image

A side benefit with SVG images is the improved clarity for backside information (smoke availability, CS, etc). Here's a screen zoomed in at 150%. I can make the superscripts more legible. Same order of formats as above.

image

The Has Info window amplifies this information as well but simply zooming in on a SVG wreck depiction allows easy reading of the notes information. With this being the case, I don't see the need to use the Replace With Other trait for Wreck depiction. I can generate a Wreck prototype that offers the same menu selection options as the current wreck counters. These menu options could be hidden from view until the Wreck layer is active. The only thing we lose is the ability for different information in the Has Info window. Typically the only thing in that window for a Wreck counter is the CS # and MG armament. Using SVG, the CS# is easily visible now and if you do need to check the MG armament, just momentarily flip the counter over to it's non-wrecked side.

Finally, SVG offers more benefits if the Mouse Over Stack trait is changed to show units in an unrotated state. Here's a screen showing what that would look like zoomed in at 150%. Easy for my aging eyes to read for sure.

image

For comparison, the top most screen shot shows these same images at 100%.

What are the SVG drawbacks?

You need to start with an SVG image to gain the benefits. Vectorizing a raster image isn't gonna gain you anything. Hence, the vast majority of current VASL images will probably never be vectorized.

An SVG image is larger than a png or gif image. A 60x60 SVG image is about 65kb vs about 6kb for a png image. Eventually the addition of SVG images will increase the size of a module. And remember that to achieve the clarity in example 3 above, each SVG counter contains 6 SVG images.

I do see benefits for SVG though. Markers can be more readily vectorized to achieve better readability. New additions to VASL (like BFPs OtO2) can be vectorized from the get go. VASL can process both gif, png, and SVG in a manner transparent to the player.

I've opened this issue for education and discussion. Please consider what I've posted here and chime in with your thoughts.

Allan

GordonMolek commented 5 months ago

OK, some progress.

[image: image.png]

The right counter is based off of (what I believe to be) a 1,000 x 1,000 "pixel" SVG base image. It is constructed in game by compositing a:

German base color counter image A "slow turret" white square image A red 11 front armor value image A red superior front armor square image A black 8 side/rear armor value image A white tracked movement type symbol image A text field for the 88L main armament A text field for the red 12 movement points value A text field for the "3/5" machine gun values A path image for the Tiger tank (rotated from a base image suitable for the wreck side of the counter, e.g., pointing 90 degrees/to the right)

Obviously some sizing and positioning issues need to be finalized but I think this is a pretty good proof of concept. I think armor values probably make the most sense as images rather than text fields as there are a limited set of values (including the unarmored "star") and they need to be properly aligned with each other and the superior/inferior symbology. Similarly for rate of fire and breakdown numbers. I think MPs, MA and MGs can be left as text fields. The database for the counters would then be a mix of text fields and identifiers for different SVG files to overlay. Will that work?

On Wed, Feb 21, 2024 at 9:50 AM Gordon Molek @.***> wrote:

Thanks, I'll look into that.

On Wed, Feb 21, 2024 at 9:15 AM Joel Uckelman @.***> wrote:

The default unit for SVG is pixels (but these are not screen pixels, they're abstract pixels). I would not recommend using any of the other absolute units, as you will inevitably come to grief by ending up with a mix of units.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1956901141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUVWMMTKQQWQ6BCHTCDYUYFQTAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGY4TAMJRGQYQ . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago

@GordonMolek We can't see your test image. Email attachments are stripped out of replies. You need to attach the image via the website.

GordonMolek commented 5 months ago

image

GordonMolek commented 5 months ago

Sorry 'bout that.

uckelman commented 5 months ago

Would you also post the SVG?

GordonMolek commented 5 months ago

Let me zip up the files.

GordonMolek commented 5 months ago

SVG_files.zip

uckelman commented 5 months ago
GordonMolek commented 5 months ago

I'm floundering around, groping in the dark. 😉

Regarding your suggestions, are those "vassal" things, "vasl" things, or individual "SVG/image" things?

I also noticed that the background color doesn't render in VASL to match the old GIF counter even those the RGB values are the same.

On Thu, Feb 22, 2024 at 2:32 PM Joel Uckelman @.***> wrote:

-

You're making all the contents of any SVG included using unavailable in the parent's DOM. Better would be to include other images using .

Regarding the fonts: If you're embarking on this project and not embedding the fonts, you're setting yourself up for endless trouble, because you will not be able to guarantee that everything will render as expected.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1960268825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUSABV6DV4SQ5DGIWG3YU6TPTAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGAZDMOBYGI2Q . You are receiving this because you were mentioned.Message ID: @.***>

apbills commented 5 months ago

RGB values not getting rendered the same is a bit troubling. I have only been using white and black in what I have been looking at so I will need to experiment a bit with that as well.

From: GordonMolek @.> Sent: Thursday, February 22, 2024 3:07 PM To: vasl-developers/vasl @.> Cc: apbills @.>; Mention @.> Subject: Re: [vasl-developers/vasl] Using SVG for VASL Discussion (#627)

I'm floundering around, groping in the dark. 😉

Regarding your suggestions, are those "vassal" things, "vasl" things, or individual "SVG/image" things?

I also noticed that the background color doesn't render in VASL to match the old GIF counter even those the RGB values are the same.

On Thu, Feb 22, 2024 at 2:32 PM Joel Uckelman @.***> wrote:

-

You're making all the contents of any SVG included using unavailable in the parent's DOM. Better would be to include other images using .

Regarding the fonts: If you're embarking on this project and not embedding the fonts, you're setting yourself up for endless trouble, because you will not be able to guarantee that everything will render as expected.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1960268825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUSABV6DV4SQ5DGIWG3YU6TPTAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGAZDMOBYGI2Q . You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/vasl-developers/vasl/issues/627#issuecomment-1960314532, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3X3PPQF4ZGVZLLTD2DGOJDYU6XOVAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGAZTCNBVGMZA. You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago

Regarding your suggestions, are those "vassal" things, "vasl" things, or individual "SVG/image" things?

My suggestions are about SVG generally.

derimmer commented 5 months ago

"Suggestions"? C'est la politesse, mon ami! LOL!

@uckelman Your direct and focused comments help us stay on the straight and narrow over here at VASL HQ. And are much appreciated.

@GordonMolek "groping in the dark" is always a great learning device so long as its not with your sister.

Seriously, this continues to be very a fruitful thread/experimentation. Keep it going and keep trying stuff.

I am thinking, in very broad strokes, about a plan something like this:

April 2024 668 bug fix, especially counters. Due to @apbills diligence, we should have almost all of the counter-based bugs sorted in 668.

Nov 2024 669 Targeted introduction of SVG graphics. We don't have much else on the table for 669. The Game Updater functionality may need some minor tweaks but I have updated a couple of hundred .vsav files and while there are issues they are all minor. So, we could/should make SVG a priority, particularly because we are going to get more pressure for functionality that zooms counters and maps differently.

April 2025 669.1 More bug fixes.

Nov 2025 670 Major rollout of SVG.

How does that sound?

zgrose commented 5 months ago

I could be mis-interpreting but I believe the suggestion (translated) is to code it up as: <use x="25" y="19" xlink:href="foo.svg#name" /> instead of <image xlink:href="../../foo.svg" x="25" y="19"></image>

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use

The advantage being, if I understand the comments and the docs, that you get a resulting SVG document that pulls in from multiple sources without "flattening" bits into images first.

The advantage being, you can have a base image (like the superior turret), but color it red for a Large Target in the counter instead of having an image for Superior Large (red) and Superior Normal (black), etc, etc

Or put another way, you keep your "primitives" in one place, inject them with use, and then modify them in the specific counter.

Hopefully I'm getting all the salient points correct.

If you ever want to go over stuff in real-time, I'm generally highly available on the ASL Discord (zgrose) for screenshares and/or audio chats. While I'm not an SVG pro, I've got a lot of experience in coding and reading docs. :)

zgrose commented 5 months ago

small correction, I appear as ZoltanG on the ASL Discord.

GordonMolek commented 5 months ago

The approach I was trying to take was to minimize the amount of futzing around for "standard" vehicle/gun counters. e.g., all the graphical assets are based on 1,000 x 1,000 (virtual SVG pixel) images so they can simply be overlaid on top of each other without worrying about x/y offsets. For most counters, the main armament, rate of fire, movement type and movement points, armor values, etc., etc. are going to be in the same place on each counter. If we can use a spreadsheet to generate the counters, so much the better. There will be those non-standard counters that require special handling but they should be minimized. That's why I was thinking in terms of separate ROF 1/2/3 images and red/black armor values and their inferior/superior indicators. If there's a significant performance impact to having many separate files then we can adjust. For instance I'm guessing we could have "use files" based on function, such as movement related, ROF, armor values, etc. and have the individual counter files include the ones they need, but that might make generation from a spreadsheet harder.

On Thu, Feb 22, 2024 at 5:40 PM Zoltan Grose @.***> wrote:

small correction, I appear as ZoltanG on the ASL Discord.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1960517839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUXR3S52AMXA46JUZULYU7JNTAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGA2TCNZYGM4Q . You are receiving this because you were mentioned.Message ID: @.***>

apbills commented 5 months ago

When you indicate embedding fonts, is this line of text what you mean? It includes the font-family within the list of style elements.

1pp

From: Joel Uckelman @.> Sent: Thursday, February 22, 2024 2:33 PM To: vasl-developers/vasl @.> Cc: apbills @.>; Mention @.> Subject: Re: [vasl-developers/vasl] Using SVG for VASL Discussion (#627)

— Reply to this email directly, view it on GitHubhttps://github.com/vasl-developers/vasl/issues/627#issuecomment-1960268825, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3X3PPX5FNNWKD7KKZAJTSTYU6TPTAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGAZDMOBYGI2Q. You are receiving this because you were mentioned.Message ID: @.***>

apbills commented 5 months ago

I think that is a plan that could work. With 6.6.8 supporting SVG it will allow many of us to experiment. I know I need to do far more experimentation using .svg files if I am going to provide any level of support for the group. My little experimentation with the Ski and Bicycle tag is really a very simplistic effort to let me learn .svg. What Gordon has done with the vehicle counter is way beyond my current understanding, but is allowing me to better understand how it all works together.

From: Doug Rimmer @.> Sent: Thursday, February 22, 2024 5:01 PM To: vasl-developers/vasl @.> Cc: apbills @.>; Mention @.> Subject: Re: [vasl-developers/vasl] Using SVG for VASL Discussion (#627)

"Suggestions"? C'est la politesse, mon ami! LOL!

@uckelmanhttps://github.com/uckelman Your direct and focused comments help us stay on the straight and narrow over here at VASL HQ. And are much appreciated.

@GordonMolekhttps://github.com/GordonMolek "groping in the dark" is always a great learning device so long as its not with your sister.

Seriously, this continues to be very a fruitful thread/experimentation. Keep it going and keep trying stuff.

I am thinking, in very broad strokes, about a plan something like this:

April 2024 668 bug fix, especially counters. Due to @apbillshttps://github.com/apbills diligence, we should have almost all of the counter-based bugs sorted in 668.

Nov 2024 669 Targeted introduction of SVG graphics. We don't have much else on the table for 669. The Game Updater functionality may need some minor tweaks but I have updated a couple of hundred .vsav files and while there are issues they are all minor. So, we could/should make SVG a priority, particularly because we are going to get more pressure for functionality that zooms counters and maps differently.

April 2025 669.1 More bug fixes.

Nov 2025 670 Major rollout of SVG.

How does that sound?

— Reply to this email directly, view it on GitHubhttps://github.com/vasl-developers/vasl/issues/627#issuecomment-1960476209, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3X3PPTXMHCTPD7XRPFTG5TYU7EZZAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGA2DONRSGA4Q. You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago

When you indicate embedding fonts, is this line of text what you mean? It includes the font-family within the list of style elements. 1pp

Yes, that's exactly what I'm pointing out as problematic, in that the font used is not embedded. If the renderer doesn't have that font, the font actually used will be a fallback, which won't give you predictable results.

GordonMolek commented 5 months ago

So which type of embedding are you recommending? I found this link: https://vecta.io/blog/how-to-use-fonts-in-svg

If I understand correctly, the code that I shared (and which was generated be Inkscape) is doing the "Using fonts with inline embedding" method.

Isn't that what - style="font-size:122.667px;font-family:Helvetica-Condensed;-inkscape-font-specification:Helvetica-Condensed;display:inline;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"

On Fri, Feb 23, 2024 at 5:32 AM Joel Uckelman @.***> wrote:

When you indicate embedding fonts, is this line of text what you mean? It includes the font-family within the list of style elements. 1pp

Yes, that's exactly what I'm pointing out as problematic, in that the font used is not embedded. If the renderer doesn't have that font, the font actually used will be a fallback, which won't give you predictable results.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1961168062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUTJUNU2P3XSEEIZYOLYVB46LAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGEYTMOBQGYZA . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago

Here's a good summary of font embedding: https://dee.underscore.world/blog/embedding-fonts-in-svgs/

Most piece faces will have four or five digits and maybe a letter or two on them, so the subsetted font included in the data URL will be tiny. That approach will give you stand-alone SVG images.

Depending on the exact use case, you might be able to provide a full font instead---but the important point here is that you must actually provide it (via a URL), not simply name it, in an @font-face rule.

GordonMolek commented 5 months ago

OK, got it. Still wrapping my semi-evolved ape brain around SVG. I was a firmware developer by trade but never worked with html/xml/svg before. Pushing honest bits around using C/C++ was my gig.

Thanks!

On Fri, Feb 23, 2024 at 5:59 AM Joel Uckelman @.***> wrote:

Here's a good summary of font embedding: https://dee.underscore.world/blog/embedding-fonts-in-svgs/

Most piece faces will have four or five digits and maybe a letter or two on them, so the subsetted font included in the data URL will be tiny. That approach will give you stand-alone SVG images.

Depending on the exact use case, you might be able to provide a full font instead---but the important point here is that you must actually provide it (via a URL), not simply name it, in an @font-face rule.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1961201801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUT2UXLNF7RKXALO5K3YVCAB3AVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGEZDAMJYGAYQ . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago

If I understand correctly, the code that I shared (and which was generated be Inkscape) is doing the "Using fonts with inline embedding" method. Isn't that what - style="font-size:122.667px;font-family:Helvetica-Condensed;-inkscape-font-specification:Helvetica-Condensed;display:inline;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" - does?

No. There is nothing in the value of that style attribute which indicates where to find the "Helvetica-Condensed" font. The @font-face and @import rules you see further down the page are what do that. Which one of those you can use depends on how you're going to be displaying the SVG, however---which is a good reason for producing the SVG from an automated pipeline once you're doing it for real, because you might need to switch or you might need to produce both formats.

uckelman commented 5 months ago

Another example, which is fairly breezy and omits a lot of detail: https://lvngd.com/blog/how-embed-google-font-svg/

GordonMolek commented 5 months ago

I have 3 current questions.

  1. Is there a fundamental performance difference between compositing an SVG VASL counter using the tag to select individual graphical images versus the suggested tag to get the equivalent image from a file of some sort?

  2. There's been discussion of having some sort of spreadsheet to specify the contents of the counters and then to "generate" the counters from it. 2a. Is there an existing script that can do that (presumably with customization to fit VASL's unique circumstances? 2b. If not, what programming language would such a script be written in? 2c. I'm guessing we'd probably have 1 such spreadsheet for vehicles, 1 for guns, and who knows how many for infantry, sw, system counters, etc?

  3. I've been trying to preview my modification using a browser (Microsoft Edge) and they do not like with file references. Is there another way to view/debug SVG file changes?

Thanks,

On Fri, Feb 23, 2024 at 6:14 AM Joel Uckelman @.***> wrote:

Another example, which is fairly breezy and omits a lot of detail: https://lvngd.com/blog/how-embed-google-font-svg/

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1961222077, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUWRTV74JBFBZGVE4BDYVCBZ3AVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGEZDEMRQG43Q . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago
  1. Is there a fundamental performance difference between compositing an SVG VASL counter using the tag to select individual graphical images versus the suggested tag to get the equivalent image from a file of some sort?

There could be. The only way to know is to measure, as with every question which bears on performance.

  1. There's been discussion of having some sort of spreadsheet to specify the contents of the counters and then to "generate" the counters from it. 2a. Is there an existing script that can do that (presumably with customization to fit VASL's unique circumstances?

I can show you the one I wrote for The Longest Day, but I do not recommend using or adapting it.

2b. If not, what programming language would such a script be written in?

One for which you will have maintainers in the long run.

If I were writing a new script for this, I would probably do it in Rust. My TLD script was in Perl, which made sense at the time, but I would not recommend doing anything new in Perl at this point. Python is another potentially popular option, though I'm unlikely to write anything myself in Python in the future. I'm not writing this script, though.

2c. I'm guessing we'd probably have 1 such spreadsheet for vehicles, 1 for guns, and who knows how many for infantry, sw, system counters, etc?

I did the TLD ones out of one spreadsheet. It's up to you.

derimmer commented 5 months ago

Given that we have over 8000 images in VASL, I am strongly in favour of multiple spreadsheets. Especially given that the implementation may be spread over time.

My feeling (without any analytical framework) is that we will see the biggest benefits from SVG in terms of improving the user experience from images for (1) vehicle, (2) infantry, (3) gun, (4) info counters on the toolbar, (5) terrain/fortification, (6) any ASL counters not in the above, and (7) counters that only exist in VASL such as perimeter markers, arrows, etc. I am sure that there will be some exceptions to that hierarchy.

GordonMolek commented 5 months ago

OK, time to buy "Rust for Dummies" I guess.

I figured out that I can use Inkscape to preview the tag with files, e.g.,

<use xlink:href="../../svg/gun_and_vehicle_assets/front_armor.svg#fa_superior" stroke="green"/>

So I think it makes sense to start grouping things like front armor symbology into a single file and we'll be able to set the color to black or red in the individual vehicle counter's SVG files a la "green" above. Yet another item for the spreadsheet to handle eventually.

On Fri, Feb 23, 2024 at 10:40 AM Doug Rimmer @.***> wrote:

Given that we have over 8000 images in VASL, I am strongly in favour of multiple spreadsheets. Especially given that the implementation may be spread over time.

My feeling (without any analytical framework) is that we will see the biggest benefits from SVG in terms of improving the user experience from images for (1) vehicle, (2) infantry, (3) gun, (4) info counters on the toolbar, (5) terrain/fortification, (6) any ASL counters not in the above, and (7) counters that only exist in VASL such as perimeter markers, arrows, etc. I am sure that there will be some exceptions to that hierarchy.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1961649792, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUTPEWXD7IBH63I7G2LYVDA7DAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGE3DIOJXHEZA . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 5 months ago

OK, time to buy "Rust for Dummies" I guess.

Rust book: https://doc.rust-lang.org/book/

uckelman commented 5 months ago

What I built for preparing the piece images for TLD is here: https://github.com/uckelman/tld-mod

The relevant part for this discussion is faces.csv, which has one piece face per line, and faces.pl, which reads lines of CSV and writes SVG.

GordonMolek commented 5 months ago

Thanks, I'll check it out.

On Fri, Feb 23, 2024 at 2:33 PM Joel Uckelman @.***> wrote:

What I built for preparing the piece images for TLD is here: https://github.com/uckelman/tld-mod

The relevant part for this discussion is faces.csv, which has one piece face per line, and faces.pl, which reads lines of CSV and writes SVG.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1961953793, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUXQ2DT2AZC2IDTP5Z3YVD4JDAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGE4TKMZXHEZQ . You are receiving this because you were mentioned.Message ID: @.***>

GordonMolek commented 4 months ago

Rust-ed German guns.

For "security" reasons the images don't display as part of the explorer preview icons, but the background counter image, the malfunctioned "X", etc. are all in the SVGs. The data is all parsed from the spreadsheet and generated by the rust script. Obviously we'll need to proof all the values, I need to figure out how to "post-scale" the images to the correct default VASL size, we'll probably want to tweak the individual item sizes and positioning and of course all the super sweet vector graphics for the guns will need to be created. I'll leave that as an exercise for the student.

Lather, rinse and repeat for all the other guns in the game. The vehicles of course which will need a modified version of the script and another spreadsheet.

image

derimmer commented 4 months ago

On the basis of understanding at least every third word of your message, I say well done, carry on and stay calm.

derimmer commented 4 months ago

Time for a shout out to Big Al.

@BigAl737 Do you see what you have done? LOL. You started this 4 years ago and it's bearing fruit.

BigAl737 commented 4 months ago

Thx @derimmer

It’s great to see such masterful minds working together to better the hobby. My thanks to all the contributors.

BigAl737 commented 4 months ago

Rust-ed German guns.

For "security" reasons the images don't display as part of the explorer preview icons, but the background counter image, the malfunctioned "X", etc. are all in the SVGs. The data is all parsed from the spreadsheet and generated by the rust script. Obviously we'll need to proof all the values, I need to figure out how to "post-scale" the images to the correct default VASL size, we'll probably want to tweak the individual item sizes and positioning and of course all the super sweet vector graphics for the guns will need to be created. I'll leave that as an exercise for the student.

Lather, rinse and repeat for all the other guns in the game. The vehicles of course which will need a modified version of the script and another spreadsheet.

image

This is impressive!

BigAl737 commented 4 months ago

May I suggest a sans serif font. Those are more readable for me.

GordonMolek commented 4 months ago

The SVG is coded for a combination of Helvetica-condensed and Arial. For some reason, probably having to do with my not implementing Joel's font suggestion yet, the Edge browser isn't rendering them as intended.

On Mon, Feb 26, 2024 at 7:48 PM Allan Cannamore @.***> wrote:

May I suggest a sans serif font. Those are more readable for me.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1965644851, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUWQZKVI6WBA5DW2ZU3YVU3QTAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGU3DINBYGUYQ . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 4 months ago

I would try to match the fonts on the real pieces.

GordonMolek commented 4 months ago

Yes, that's my intention. AFAIK, Helvetica-condensed is the font that AH/MMP uses for the counters. The only reason to also use Arial selectively is that Helvetica-condensed doesn't appear to have a 5-stroke asterisk.

On Tue, Feb 27, 2024 at 5:40 AM Joel Uckelman @.***> wrote:

I would try to match the fonts on the real pieces.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1966361276, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUQ6LMHUK75KHKT4QXDYVXA2NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGYZTMMJSG43A . You are receiving this because you were mentioned.Message ID: @.***>

GordonMolek commented 4 months ago

Here's a question for the hive-mind. I'm reworking my prototype code to parse a (slightly edited) version of the ordnance and vehicle listing tables on Klas's website. I can parse the data to figure out, for instance, when a gun should have the (un)hooking penalty added to it's manhandling number (the entry is in bold. I don't see an obvious way to identify counters that should have a (5-lobed) asterisk in front of the gun caliber designation. Does anyone see anything in the listings that I'm not seeing? If worst comes to worst I can add another column to the scraped table and then indicate which entries should have it but I would like to avoid that. TIA

On Tue, Feb 27, 2024 at 5:50 AM Gordon Molek @.***> wrote:

Yes, that's my intention. AFAIK, Helvetica-condensed is the font that AH/MMP uses for the counters. The only reason to also use Arial selectively is that Helvetica-condensed doesn't appear to have a 5-stroke asterisk.

On Tue, Feb 27, 2024 at 5:40 AM Joel Uckelman @.***> wrote:

I would try to match the fonts on the real pieces.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1966361276, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUQ6LMHUK75KHKT4QXDYVXA2NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGYZTMMJSG43A . You are receiving this because you were mentioned.Message ID: @.***>

derimmer commented 4 months ago

Yes, that's my intention. AFAIK, Helvetica-condensed is the font that AH/MMP uses for the counters. The only reason to also use Arial selectively is that Helvetica-condensed doesn't appear to have a 5-stroke asterisk. On Tue, Feb 27, 2024 at 5:40 AM Joel Uckelman @.> wrote: I would try to match the fonts on the real pieces. — Reply to this email directly, view it on GitHub <#627 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUQ6LMHUK75KHKT4QXDYVXA2NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGYZTMMJSG43A . You are receiving this because you were mentioned.Message ID: @.>

This is sensible and appropriate but I would not be rigid in matching the real pieces. A quick survey of MMP and TPP cardboard products would reveal a range of fonts.

derimmer commented 4 months ago

Here's a question for the hive-mind. I'm reworking my prototype code to parse a (slightly edited) version of the ordnance and vehicle listing tables on Klas's website. I can parse the data to figure out, for instance, when a gun should have the (un)hooking penalty added to it's manhandling number (the entry is in bold. I don't see an obvious way to identify counters that should have a (5-lobed) asterisk in front of the gun caliber designation. Does anyone see anything in the listings that I'm not seeing? If worst comes to worst I can add another column to the scraped table and then indicate which entries should have it but I would like to avoid that. TIA On Tue, Feb 27, 2024 at 5:50 AM Gordon Molek @.> wrote: Yes, that's my intention. AFAIK, Helvetica-condensed is the font that AH/MMP uses for the counters. The only reason to also use Arial selectively is that Helvetica-condensed doesn't appear to have a 5-stroke asterisk. On Tue, Feb 27, 2024 at 5:40 AM Joel Uckelman @.> wrote: > I would try to match the fonts on the real pieces. > > — > Reply to this email directly, view it on GitHub > <#627 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AYLTFUQ6LMHUK75KHKT4QXDYVXA2NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGYZTMMJSG43A > . > You are receiving this because you were mentioned.Message ID: > @.***> >

I believe that in cardboardland an asterisk before the gun caliber is an information alert telling you to turn the counter over. Personally, I see no reason to replicate the asterisk (or some other form of alert) on the front of VASL counters. We have our Show Info tool. While we have thought about redoing the current text box approach, I don't think we need anything on the counter front. Just my view.

GordonMolek commented 4 months ago

I was just considering it for consistency with the physical counters. Also, we could auto-generate "real" wreck/backside counters and/or auto-populate the info tool.

On Tue, Feb 27, 2024 at 10:39 AM Doug Rimmer @.***> wrote:

Here's a question for the hive-mind. I'm reworking my prototype code to parse a (slightly edited) version of the ordnance and vehicle listing tables on Klas's website. I can parse the data to figure out, for instance, when a gun should have the (un)hooking penalty added to it's manhandling number (the entry is in

*bold. I don't see an obvious way to identify counters that should have a (5-lobed) asterisk in front of the gun caliber designation. Does anyone see anything in the listings that I'm not seeing? If worst comes to worst I can add another column to the scraped table and then indicate which entries should have it but I would like to avoid that. TIA … <#m443988990825810732> On Tue, Feb 27, 2024 at 5:50 AM Gordon Molek @.> wrote: Yes, that's my intention. AFAIK, Helvetica-condensed is the font that AH/MMP uses for the counters. The only reason to also use Arial selectively is that Helvetica-condensed doesn't appear to have a 5-stroke asterisk. On Tue, Feb 27, 2024 at 5:40 AM Joel Uckelman @.> wrote: > I would try to match the fonts on the real pieces. > > — > Reply to this email directly, view it on GitHub > <#627 (comment) https://github.com/vasl-developers/vasl/issues/627#issuecomment-1966361276>,

or unsubscribe > https://github.com/notifications/unsubscribe-auth/AYLTFUQ6LMHUK75KHKT4QXDYVXA2NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGYZTMMJSG43A https://github.com/notifications/unsubscribe-auth/AYLTFUQ6LMHUK75KHKT4QXDYVXA2NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGYZTMMJSG43A . > You are receiving this because you were mentioned.Message ID: > @.**>

I believe that in cardboardland an asterisk before the gun caliber is an information alert telling you to turn the counter over. Personally, I see no reason to replicate the asterisk (or some other form of alert) on the front of VASL counters. We have our Show Info tool. While we have thought about redoing the current text box approach, I don't think we need anything on the counter front. Just my view.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1967038333, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUU5NUYOOU2XPYR6HQTYVYD5NAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWG4YDGOBTGMZQ . You are receiving this because you were mentioned.Message ID: @.***>

BigAl737 commented 4 months ago

One data source would definitely cut down on errors. I’m impressed with @GordonMolek and @uckelman TLD approach to importing data to convert to SVG. I also like the idea for a full counter backside. Anything that makes the VASL counter look like its physical counterpart.

That being said, I agree with @derimmer about removing the expanded info asterisks. At 60x60 pixels, counter real estate is at a premium and asterisks just induce clutter. I’m not even sure expanded info asterisks were needed on the physical counters. My experience has been that when you pull counters for a game, you also read up on the associated Chapter H info. Many times I’ve seen both VASL and physical game players place a spare counter near by for easy reference.

I’m not sure how images would be converted to SVG without investing a ton of time. I can take a raster image and and auto-trace it to convert it to a reasonable looking SVG as long as you don’t zoom too much but a hand drawn SVG looks sooo much better. I wonder if AI could help with this process…”Alexa, draw a top view of an M4A2.” I say this tongue in cheek but it just may be possible.

Finally, as we proceed I’m in the camp of making VASL look like the cardboard as much as possible.

GordonMolek commented 4 months ago

I'm willing to go with the consensus view. It is unfortunate that I can determine whether or not the Manhandling # on the counter should have an asterisk (NM/RFNM) from the table data but not the gun caliber, but I can think of several relatively easy ways to implement it.

Regarding vehicle and gun graphics. My plan was to have the new SVG counters use the original vehicle/gun graphics in such a way that when new vector-based graphics are available they can be swapped in on a counter by counter basis.

Since Curt seems to be a big fan of VASL, I wonder if "we" could approach him and lay out what we're trying to do and try to work out some way that they could help with the graphics?

On Tue, Feb 27, 2024 at 1:31 PM Allan Cannamore @.***> wrote:

One data source would definitely cut down on errors. I’m impressed with @GordonMolek https://github.com/GordonMolek and @uckelman https://github.com/uckelman TLD approach to importing data to convert to SVG. I also like the idea for a full counter backside. Anything that makes the VASL counter look like its physical counterpart.

That being said, I agree with @derimmer https://github.com/derimmer about removing the expanded info asterisks. At 60x60 pixels, counter real estate is at a premium and asterisks just induce clutter. I’m not even sure expanded info asterisks were needed on the physical counters. My experience has been that when you pull counters for a game, you also read up on the associated Chapter H info. Many times I’ve seen both VASL and physical game players place a spare counter near by for easy reference.

I’m not sure how images would be converted to SVG without investing a ton of time. I can take a raster image and and auto-trace it to convert it to a reasonable looking SVG as long as you don’t zoom too much but a hand drawn SVG looks sooo much better. I wonder if AI could help with this process…”Alexa, draw a top view of an M4A2.” I say this tongue in cheek but it just may be possible.

Finally, as we proceed I’m in the camp of making VASL look like the cardboard as much as possible.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1967454213, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUTT6PL7DE6LZSPIKXDYVYYCHAVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWG42DKNBSGEZQ . You are receiving this because you were mentioned.Message ID: @.***>

derimmer commented 4 months ago

On your first point, I am a big fan of half-a-loaf. I'll take a simple, partial implementation that handles all the easy issues first and leaves the hard stuff for later. The Manhandling issue feels like an "edge case" as the youngsters say, and i don't think we should sweat the small stuff.

On point two, I like your plan.

On point three, for good reasons we each tend to keep our distance. I would think an appeal to the community via the usual suspects (GS, FB, and Discord) might be the way to go. I don't think we would get a flood of offers but we might get some. Especially once people can see the difference, which is why your point two is such a good idea.

GordonMolek commented 4 months ago

OK. I have a simplified German gun counter that doesn't reference any external images. It constructs all the items as rectangles, circles, text, etc. For my convenience I worked on it as a 1000 x 1000 virtual pixel image figuring that VASSAL/VASL would scale down the image when it rendered it to correspond to the current 60 x 60 pixel GIF/PNG counter images. When I try to substitute one of my "new hotness" images for the "old busted" the module editor just displays a "No image" graphic. Any thoughts as to what I've screwed up? I've attached one of the SVG counter image files. geAA20L4

uckelman commented 4 months ago

It doesn't have a width or height attribute on the root svg element. Vassal's renderer needs that.

GordonMolek commented 4 months ago

OK, I thought the viewport was sufficient. So do I give it the 60 x 60 width and height or the 1000 x 1000?

On Wed, Feb 28, 2024 at 4:03 PM Joel Uckelman @.***> wrote:

It doesn't have a width or height attribute on the root svg element. Vassal's renderer needs that.

— Reply to this email directly, view it on GitHub https://github.com/vasl-developers/vasl/issues/627#issuecomment-1969994894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYLTFUSY6MHAKMJZINQR3SDYV6SR7AVCNFSM4LRCVSM2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWHE4TSNBYHE2A . You are receiving this because you were mentioned.Message ID: @.***>

uckelman commented 4 months ago

I expect 60 x 60. Try and see.