Create account / Log in

Make "Center on opponent's moves" really center on its move

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

Make "Center on opponent's moves" really center on its move

Postby ClaudioC » August 16th, 2020, 8:29 pm

Currently (3.3.2) the "Center on opponent's move" feature does not really center on the moved unit. Rather it makes sure the hex where the unit is moved to is visible in the player's screen. In the situation where the move occurred outside of the area the player was seeing before the opponent move, this results in observing the opponent's move on one of the edges of the new visible area of the map.

This feature will be more effective if the opponents move is placed at the center.

Technically this should be feasible and might have been overlooked when this feature was initially developed.

There is already some code to recenter the map on a right click (see VASSAL.build.module.map.MapCenterer)
User avatar
ClaudioC
 
Posts: 67
Joined: April 18th, 2018, 6:30 pm

Re: Make "Center on opponent's moves" really center on its m

Postby Cattlesquat » August 19th, 2020, 8:56 pm

I certainly like that idea. Claudio you could make your first PR!

There's the question of whether "the old behavior" should remain as a preference. Personally I think no, but I don't know if there's some use case that more closely depends on the current implementation.

And I suppose there could be some heuristic like "if already within the center 1/9 of the screen, don't recenter". Just something to think about.

Brian
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Make "Center on opponent's moves" really center on its m

Postby Flint1b » August 20th, 2020, 12:11 am

Sounds good, I know this problem, sometimes I replay the log and it "centers" on the moved piece but I have to scroll the map some more to see where the piece originally came from so I can evaluate whether the move was legit.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Make "Center on opponent's moves" really center on its m

Postby uckelman » August 21st, 2020, 9:51 pm

I believe this works the way it does because if the piece is already on-screen, it can be jarring for the map to jump just to center it. I'm not saying it's not worth trying, but this is something where you might find after using it a bit that you actually prefer the old way.
User avatar
uckelman
Site Admin
 
Posts: 8989
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Make "Center on opponent's moves" really center on its m

Postby Cattlesquat » August 21st, 2020, 10:39 pm

I think just some slightly better heuristics are in order. In games like e.g. Civ2 we didn't force-center if your piece was already mostly on screen, but if we DID recenter we fully centered on the piece, rather than moving only enough to get it "just barely on screen" (and then you don't necessarily have the context around it).
User avatar
Cattlesquat
 
Posts: 947
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests