New VASL Extension - BoardZoomer.vmdx

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,593
Reaction score
10,696
Location
Kraut Corner
Country
llUkraine
There is a bit of proportionality error, meaning if you move something by a lot then placement will be off by a lot. So I was sometimes able to "nudge" things a bit more accurately by clicking, dragging just a little, and dropping so the placement error wouldn't be as large for a smaller movement. But even then there seemed to be odd jumps/offsets that would appear even in these small movements
Yes, this mirrors my observations.

As this seems to be a general issue of VASL v6.6.8, I replied to this in greater detail in the VASL Map Online/Suggestion Form thread.

von Marwitz
 

Robin Reeve

The Swiss Moron
Staff member
Moderator
Joined
Jul 26, 2003
Messages
19,917
Reaction score
5,975
Location
St-Légier
First name
Robin
Country
llSwitzerland
I have the empiric impression that when moving a stack, placement is more easy than with a single counter..
 

apbills

Elder Member
Joined
Jan 28, 2003
Messages
3,501
Reaction score
1,034
Location
Pewaukee, WI
Country
llUnited States
The trick is to look at the ghosted image, not your curser position. Rarely is your cursor in the center of the counter you select, however, the ghosted image of the counter when you move it will show you exactly where VASL thinks you are trying to place the counter. Most positioning errors are due to this - i.e., you place your cursor in the center of the hex, but the ghosted image center is actually towards a hexside.
 

PresterJohn

Elder Member
Joined
Feb 13, 2022
Messages
1,197
Reaction score
681
Location
The Orient
Country
llAustralia
It has been suggested that the Preference option to override native drag-and-drop might help when positioning counters. Can this be confirmed?
 

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
The trick is to look at the ghosted image, not your curser position. Rarely is your cursor in the center of the counter you select, however, the ghosted image of the counter when you move it will show you exactly where VASL thinks you are trying to place the counter. Most positioning errors are due to this - i.e., you place your cursor in the center of the hex, but the ghosted image center is actually towards a hexside.
This is absolutely NOT the case in 6.6.8 as I can carefully center the ghosted image on a hex and it will jump to a hex side when placed. Similarly for off board placement the counter can jump substantially from the ghosted imaged location when placed. It seems extremely random as for series of placements it will behave as expected (counter lands exactly where ghosted image is) and then suddenly it will start jumping on placement.

It is very broken right now unfortunately.

EDIT: But I should add this is excellent general advice applicable to all previous versions!
 
Last edited:

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
It has been suggested that the Preference option to override native drag-and-drop might help when positioning counters. Can this be confirmed?
Where is this preference? I can't find it anywhere in either the VASSAL or VASL settings. (Running MacOS if that matters)
 

apbills

Elder Member
Joined
Jan 28, 2003
Messages
3,501
Reaction score
1,034
Location
Pewaukee, WI
Country
llUnited States
This is absolutely NOT the case in 6.6.8 as I can carefully center the ghosted image on a hex and it will jump to a hex side when placed. Similarly for off board placement the counter can jump substantially from the ghosted imaged location when placed. It seems extremely random as for series of placements it will behave as expected (counter lands exactly where ghosted image is) and then suddenly it will start jumping on placement.

It is very broken right now unfortunately.

EDIT: But I should add this is excellent general advice applicable to all previous versions!
Apparently our experiences differ. I have no problem centering this way using 668 and the BZ extension. Perhaps it is the zoom level you are on with the mapboard (not the Bzoomer). I am zoomed to where the counter image is completely contained within one hex.

Edit: Just to be clear, I agree there is an issue. What I am saying is that issue can be reduced significantly by careful placement of counters and by using the move shortcut keys when possible (bypass movement is not possible with those keys).
 
Last edited:

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
Apparently our experiences differ. I have no problem centering this way using 668 and the BZ extension. Perhaps it is the zoom level you are on with the mapboard (not the Bzoomer). I am zoomed to where the counter image is completely contained within one hex.

Edit: Just to be clear, I agree there is an issue. What I am saying is that issue can be reduced significantly by careful placement of counters and by using the move shortcut keys when possible (bypass movement is not possible with those keys).
And what I am saying is that at least on my installation it is not reduced AT ALL by "careful placement of counters". I've tested at zoom levels up to 200% for both on board and off board. Even with exacting placement it will jump on about 10 to 15% of placements. There is really no rhyme or reason I can detect as to when it will jump or not. In fact, if I intentionally try to put in a small offset from the center dot to see if I can get it to jump say to the upper hex side sometimes it will jump in the opposite direction to a lower hex side. The problem, again in my careful testing on my particular installation (with no BoardZoomer), has absolutely nothing to do with sloppy placement or zoom level. It just randomly offsets the placement in a significant fraction of placements even at high magnification with exacting placement.

Indeed, using shortcut keys dodges the problem when it is possible to use them.

EDIT: See below, what actually matters it turns out is not care in placing the counter but care in clicking on the counter in the first place!
 
Last edited:

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
I think I figured it out!!!

VASL 6.6.7:

Counter is placed based on the "ghosted image" as @apbills already mentioned and as I think we are all used to. Drag the ghosted image where you want the counter and release and that's exactly where the counter lands.

VASL 6.6.8:

Counter center is placed based on the mouse pointer! So if you try to place based on the ghosted image and you have not managed to click on the exact center of the counter when you picked it up to drag it then the counter will "jump".

Off board the jump will be the exact offset of the mouse pointer from the center of the counter.

On board there is this same offset, but of course it will then "snap" to one of the grid points which in some cases will make it go where you expected it to, but in other cases if you had a significant offset from the counter center to the mouse pointer when you clicked to drag the counter then it is enough to snap to a different grid point.

Give this a try and see if you see the same behavior. Grabbing a counter by its edge and trying to place it makes the behavior obvious.
 

von Marwitz

Forum Guru
Joined
Nov 25, 2010
Messages
14,593
Reaction score
10,696
Location
Kraut Corner
Country
llUkraine
I think I figured it out!!!

VASL 6.6.7:

Counter is placed based on the "ghosted image" as @apbills already mentioned and as I think we are all used to. Drag the ghosted image where you want the counter and release and that's exactly where the counter lands.

VASL 6.6.8:

Counter center is placed based on the mouse pointer! So if you try to place based on the ghosted image and you have not managed to click on the exact center of the counter when you picked it up to drag it then the counter will "jump".

Off board the jump will be the exact offset of the mouse pointer from the center of the counter.

On board there is this same offset, but of course it will then "snap" to one of the grid points which in some cases will make it go where you expected it to, but in other cases if you had a significant offset from the counter center to the mouse pointer when you clicked to drag the counter then it is enough to snap to a different grid point.

Give this a try and see if you see the same behavior. Grabbing a counter by its edge and trying to place it makes the behavior obvious.
Haven't tried it yet, but by previous experience and gut feeling, you might have nailed it...

von Marwitz
 

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
Looks like commit #1589 made fairly massive changes to ASLPieceMover.java which not surprisingly now has to deal with new scaling factors for BoardZoomer hooks. Function and variable names related to both piece location, mouse pointer location, and various event listeners all in the changes.

Over a 1,000 lines changed/added in that one file. Pretty daring for a "bug fix" release ;)

Anyway, easy to imagine that in dealing with all the various scaling issues that this behavior change could have been introduced unintentionally. As it is now it is a bit pathological behavior but at least knowing what the behavior is makes it a bit easier for me to deal with!
 

apbills

Elder Member
Joined
Jan 28, 2003
Messages
3,501
Reaction score
1,034
Location
Pewaukee, WI
Country
llUnited States
I think there are a lot of variables in play. When I drag a counter from the counter tray, I can select the lower right corner, move my cursor to exactly over the middle lower right hexside line, which places the ghost image center between the center dot and the hexside, and it still snaps to the center. Doing the same but moving a counter on the mapboard it still seems to snap based on the center of the ghosted image.

I can grab a counter from the counter tray, this time from the upper left corner, place the ghosted image directly on the lower left hexside, which places the cursor just down/right of the center dot, and the counter snaps to the hexside - again, right where the ghosted image is.

The fact that @DVexile has a different experience seems to indicate something else is in play that is not obvious.
 

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
I think there are a lot of variables in play. When I drag a counter from the counter tray, I can select the lower right corner, move my cursor to exactly over the middle lower right hexside line, which places the ghost image center between the center dot and the hexside, and it still snaps to the center. Doing the same but moving a counter on the mapboard it still seems to snap based on the center of the ghosted image.

I can grab a counter from the counter tray, this time from the upper left corner, place the ghosted image directly on the lower left hexside, which places the cursor just down/right of the center dot, and the counter snaps to the hexside - again, right where the ghosted image is.

The fact that @DVexile has a different experience seems to indicate something else is in play that is not obvious.
Counter tray behaves for me just like you. Now try moving a counter already on the board instead of pulling a counter from the tray. That's where the offset/jumping behavior occurs - for me at least. Try it off board where the board snapping isn't in play and maybe you'll see a similar jump?

EDIT: Also, I'm on MacOS in case whatever changed in 6.6.8 pointer references is OS specific in some unexpected way.
 

DVexile

Elder Member
Joined
Mar 27, 2022
Messages
667
Reaction score
1,098
Location
Baltimore, MD
First name
Ken
Country
llUnited States
Woah - this is even more freaky...

So following up on @apbills excellent comments on pulling from the tray behavior:

If I pull a new counter from the tray using its upper left corner and drop it on the board (off map) it drops right where the ghost is. Now if I try to move it again, but now click it in the middle (or anywhere else on the counter) when I place it the counter jumps so that its upper left corner is where the mouse pointer is.

If I try to move any other existing counter on the board it will also now jump its upper left corner to the mouse pointer when placed.

I can grab another counter from the tray by the lower right corner and now it "remembers" that it was pulled from the tray by the lower right corner and will snap the lower right corner to the mouse pointer whenever it is moved again.

If I then select any other counter already on the board and try to move it now that counter will also snap its lower right corner to the mouse pointer when placed.

If I load a different saved game the counters will still snap based on the last counter pulled from the tray.

If I exit VASL, restart VASL, and load a saved game now the center of counters already on board snap to the mouse pointer.

So what I'm seeing is:
  • When VASL first loads, counters will jump such that the center of the counter ends up on the mouse pointer regardless of the ghosted image
  • As soon as a counter is pulled from the tray the new "jump point" is wherever the mouse pointer was relative to the counter when you pulled it from the tray
  • This reference point persists until you pull a new counter from the tray or restart VASL
  • Trying to analyze these offsets on the mapboard is futile because the grid snapping behavior will confuse the issue, better to do it off the map
 

PresterJohn

Elder Member
Joined
Feb 13, 2022
Messages
1,197
Reaction score
681
Location
The Orient
Country
llAustralia
Where is this preference? I can't find it anywhere in either the VASSAL or VASL settings. (Running MacOS if that matters)
No it's not on the Mac. On my PC the counter image is more crudely shown with that option and as you have already said, placement of just the crude counter outline seems to be easier/more accurate especially when aiming for the non-centre snap-to locations so as to place two stacks side by side in the hex.
 
Top