Create account / Log in

Recenter Map problem

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Recenter Map problem

Postby krenshala » November 26th, 2010, 6:54 am

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 :)). 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 "<player> moved <counter> 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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: Recenter Map problem

Postby krenshala » December 5th, 2010, 5:31 am

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.

Image

Image

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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: [messages] [Technical Support & Bugs] Re: Recenter Map p

Postby mkiefte » December 5th, 2010, 10:50 am

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 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] http://koboldi.net/starfire/sf_vassal_map.png
> [2] http://koboldi.net/starfire/sf_vassal_m ... center.png
>
>
> _______________________________________________
> Read this topic online here:
> viewtopic.php?p=20867#p20867
> _______________________________________________
> messages mailing list
> messages@vassalengine.org
> http://www.vassalengine.org/mailman/listinfo/messages
>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Technical Support & Bugs] Re: Recenter Map p

Postby krenshala » December 5th, 2010, 7:01 pm

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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby mkiefte » December 5th, 2010, 10:08 pm

When you say "Recenter Map", do you mean "Recenter Pieces"? I'm confused.

- M.

On 5 December 2010 15:01, krenshala 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.
>
>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby krenshala » December 5th, 2010, 11:40 pm

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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby mkiefte » December 6th, 2010, 9:13 am

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 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:
> viewtopic.php?p=20881#p20881
> _______________________________________________
> messages mailing list
> messages@vassalengine.org
> http://www.vassalengine.org/mailman/listinfo/messages
>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby krenshala » December 6th, 2010, 5:10 pm

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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby mkiefte » December 6th, 2010, 6:37 pm

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 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:
> viewtopic.php?p=20885#p20885
> _______________________________________________
> messages mailing list
> messages@vassalengine.org
> http://www.vassalengine.org/mailman/listinfo/messages
>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby krenshala » December 6th, 2010, 7:05 pm

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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby mkiefte » December 6th, 2010, 11:39 pm

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 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.
>
>
>
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby krenshala » December 7th, 2010, 1:06 am

mkiefte wrote: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?).

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). :D 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.

mkiefte wrote: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.

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.)

mkiefte wrote: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....

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. :D
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm

Re: [messages] [Technical Support & Bugs] Re: [Technical Sup

Postby tar » December 7th, 2010, 3:34 pm

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.
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Re: Recenter Map problem

Postby uckelman » December 8th, 2010, 6:40 pm

This has been noted in the tracker as Bug 3234:

http://www.vassalengine.org/tracker/sho ... gi?id=3234
User avatar
uckelman
Site Admin
 
Posts: 8798
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Recenter Map problem

Postby krenshala » December 9th, 2010, 2:32 am

uckelman wrote:This has been noted in the tracker as Bug 3234:

http://www.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.
krenshala
 
Posts: 27
Joined: June 14th, 2010, 6:11 pm


Return to Technical Support & Bugs

Who is online

Users browsing this forum: Google [Bot] and 1 guest