Recenter Map problem

I’m currently working on a module, and have been testing things as I add them (since I’m attempting to figure out what I’m doing as I try to do it :slight_smile:). I just now added the Recenter Map function and tested it with two counters on an otherwise empty map. What I discovered was that in certain placements the recentered counters are not centered in the hexes after pressing the button. They are centered on the map, but not properly aligned with the hex-grid. This does not always happen, as it appears to depend on both the map alignment (hex grid offset) as well as the overall positioning of the counters on the map.

At first I thought it was because I had adjusted the hex offset (I have a mild dislike of the left and right most rows being chopped in half, and had adjusted the hexmap half a hex width to the right), but the problem continues to appear even after I recent the hexmap offset back to 0,0 instead of the 50,0 I was using (my hexes are 116x100).

I have had this happen before in other modules I was playing around in, but thought it was something I had done. With this brand new module, however, I am confident this is not the case (unless I’ve missed a configuration option while editing the module ;)).

To reproduce it, all you need to do is create a new module, add one counter, add a hex map and the Recenter Map option. Place two counters on the map, two hexes apart in any configuration, and then press the Recenter Map button. Move the display to the new counter locations, and check their position. If, on the off chance, you don’t see the problem at that time, move one of the counters one hex in any direction that is not toward or away from the other counter and press the Recenter Map button again to see the problem.

Personally, it looks to me like the recentering code does not check counter alignment in reference to the snap-to-grid settings. Based on movement messages after recentering, it looks like Vassal /thinks/ the counters are correctly centered in certain hexes, but they aren’t displayed there (e.g., move a counter one half-hex up-and-right and get the message " moved from 1001 → 1001" as if I had moved it to the hex it was already in).

Vassal version 3.1.14
Sun Java 1.6.0_20
WinXP SP3

If anyone needs more information I will be happy to provide it.

Just on the off chance my description in the previous post didn’t make it clear, here is a before and after recenter screen shot to show what is happening.

The second (after recenter) image shows where the peices ended up. I selected one piece so you could more easily follow the movement trail to see exactly how it has moved.

It looks like your grid is not aligned to the map properly.

Those hexes are not being drawn by VASSAL I assume.

  • M.

On 2010-12-05, at 1:31 AM, krenshala krenshala@koboldi.net wrote:

Just on the off chance my description in the previous post didn’t make
it clear, here is a before and after recenter screen shot to show what
is happening.

[1]

[2]

The second (after recenter) image shows where the peices ended up. I
selected one piece so you could more easily follow the movement trail to
see exactly how it has moved.

[1] koboldi.net/starfire/sf_vassal_map.png
[2] koboldi.net/starfire/sf_vassal_m … center.png


Read this topic online here:
https://forum.vassalengine.org/t/recenter-map-problem/3463/2


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

The hexmap has no image. It is entirely drawn by Vassal. The only images are in the counters. They snap-to-grid correctly when moved by a player, but do not snap-to-grid when the Recenter Map function is used.

When you say “Recenter Map”, do you mean “Recenter Pieces”? I’m confused.

  • M.

On 5 December 2010 15:01, krenshala krenshala@koboldi.net wrote:

“mkiefte” wrote:

It looks like your grid is not aligned to the map properly.

Those hexes are not being drawn by VASSAL I assume.

The hexmap has no image. It is entirely drawn by Vassal. The only
images are in the counters. They snap-to-grid correctly when moved by a
player, but do not snap-to-grid when the Recenter Map function is used.

Whatever the function is that adjusts all counters so they are centered on the map. I don’t remember the exact name.

The hex grid itself, is that part of the background space image, or is it being generated by VASSAL?

  • M.

On 2010-12-05, at 7:40 PM, krenshala krenshala@koboldi.net wrote:

“mkiefte” wrote:

When you say “Recenter Map”, do you mean “Recenter Pieces”? I’m
confused.

Whatever the function is that adjusts all counters so they are centered
on the map. I don’t remember the exact name.


Read this topic online here:
https://forum.vassalengine.org/t/recenter-map-problem/3463/6


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

The reason I asked was because the space background was obviously not generated by VASSAL. So if you change the offset of the hex grid, do the pieces change location when you rrecenter them? Are they always that offset from the background hex grid or are they more or less independent of the hex grid?

  • M

On 2010-12-06, at 1:10 PM, krenshala krenshala@koboldi.net wrote:

“mkiefte” wrote:

The hex grid itself, is that part of the background space image, or is
it being generated by VASSAL?

  • M.

“krenshala” wrote:

The hexmap has no image. It is entirely drawn by Vassal.


Read this topic online here:
https://forum.vassalengine.org/t/recenter-map-problem/3463/8


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

I’m not sure what you are talking about. There are counters, and a Vassal generated hex-grid. Nothing else.

No background image. No imported map. Nothing but Vassal generated content!

If you reread my original post you will see where I originally thought the problem was due to my changing the Vassal generated hex-grid offset, but I still have the problem after changing the offsets back to zero.

If you reread my original post, you will see how simple it is to recreate the problem. – 1) MAKE YOUR OWN MODULE … with a hex map, and one counter. 2) Place two copies of that counter on the map. 3) Tell Vassal to recenter the pieces. 3a) if it happened to line up correctly, move ONE piece in a direction other than toward or away from the other and tell Vassal to recenter the pieces again.

I really can’t make it any simpler for you.

Okay, I think I have a better grasp of what is going on.

First off, I didn’t realise that the galaxy was a game piece. it blended in
so well with the background, that I thought it was part of the game map
image which is why I kept asking about the grid (why would you want to move
a galaxy?).

Second, I have never used the recenter pieces button, and I didn’t really
have a good idea what it was used for. But now that I know what it’s for,
I’m still scratching my head as to why anyone would need it. It seems kind
of pointless when you could have an overview window instead.

But you’re right, it probably was not intended for use with hex grids. That
seems pretty obvious. It is a bug, and I will include it as such. Thanks
for bringing this to our attention.

I still can’t believe no one ever noticed this before…

  • M.

On 6 December 2010 15:05, krenshala krenshala@koboldi.net wrote:

“mkiefte” wrote:

The reason I asked was because the space background was obviously not
generated by VASSAL. So if you change the offset of the hex grid, do
the pieces change location when you rrecenter them? Are they always
that offset from the background hex grid or are they more or less
independent of the hex grid?

  • M

I’m not sure what you are talking about. There are counters, and a
Vassal generated hex-grid. Nothing else.

No background image. No imported map. Nothing but Vassal generated
content!

If you reread my original post you will see where I originally thought
the problem was due to my changing the Vassal generated hex-grid
offset, but I still have the problem after changing the offsets back to
zero.

If you reread my original post, you will see how simple it is to
recreate the problem. – 1) MAKE YOUR OWN MODULE … with a hex map,
and one counter. 2) Place two copies of that counter on the map. 3)
Tell Vassal to recenter the pieces. 3a) if it happened to line up
correctly, move ONE piece in a direction other than toward or away from
the other and tell Vassal to recenter the pieces again.

I really can’t make it any simpler for you.

Nah, its a warp point, not a galaxy. Ya gotta make 'em look all pretty for the map despite the fact the rules list them as invisible points in space created by gravity (or some other pseudo-science of your choice). :smiley: I happened to forget what size counters I was going to be using when I made it, so it was created at 150x150 px instead of the 100x100 it was supposed to be. It looked so good, however, I decided not to resize it.

I don’t know about other games, but in Starfire it is quite common to end up in a stern chase (running engagement where the guy in front is trying to keep the range open, while the guy in back is trying to close). When that happens, it is very easy to “run off the map”. The Recenter Pieces button moves all the counters so they are centered on the map without changing their positions relative to each other, allowing you to travel however far you need to during the battle without running out of map.

I haven’t tried it with a square grid, but if you have two peices three rows/columns apart then it should be possible to tell whether it suffers the same problem or not. In fact, let me do that right now. … (5 minutes later) … Yep, the problem is fully reproducible with a Rectangular Grid in exactly the same manner as it happens in a hex grid. (new module, made a board, added rectangular grid, added the recenter option, created a counter and tested.)

I can only assume that nobody has used it yet, because I found it just screwing around with three counters on the map while making sure all the do-dads in my new module were doing what I wanted in addition to what I told them to. :smiley:

On Dec 6, 2010, at 5:06 PM, krenshala wrote:

I don’t know about other games, but in Starfire it is quite common to
end up in a stern chase (running engagement where the guy in front is
trying to keep the range open, while the guy in back is trying to
close). When that happens, it is very easy to “run off the map”. The
Recenter Pieces button moves all the counters so they are centered on
the map without changing their positions relative to each other,
allowing you to travel however far you need to during the battle
without
running out of map.

This is often a common mechanic in tactical games with generic blank
maps, like air or ship combat (and in this case, space). Since there
isn’t really any terrain, you can adjust the position of pieces
without having to worry about exactly where on the map you are. The
air combat games that I play will often move the pieces several times
during the course of a game.

This has been noted in the tracker as Bug 3234:

vassalengine.org/tracker/sho … gi?id=3234

I haven’t had a chance to download 3.1.15, so I don’t know for sure that it happens there (though I assume it would since it appears to be an obscure bug from the perspective of the users ;)) but you have it listed in the bug tracker as a problem with respect to hex-grids, when it is a problem for rectangular grids as well based on my testing a few days ago.