Create account / Log in

Overlays

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Overlays

Postby tinjaw » October 5th, 2020, 6:31 pm

I am wondering if there is any functionality existing in VASSAL that I can exploit to create "overlays" for the maps on the map board. For example, if this is a military map, I want to be able to "overlay" unit boundaries and phase lines. I might want to overlay suspected enemy positions. Etc. Any ideas?
User avatar
tinjaw
 
Posts: 39
Joined: April 10th, 2020, 12:11 pm

Re: Overlays

Postby Brent Easton » October 5th, 2020, 9:36 pm

There is no in-built way where extra 'map overlays' as such can just be added.

I have always implemented 'Overlays' as you describe as At-Start stacks of standard, but very large counters containing the modified map image. The Overlay counter has a Layer trait containing the overlay image that can be turned on and off. The tricky bit is creating the Overlay the correct size and then getting it the At-Start stack in the correct place, but once done once, I have found this to be quite satisfactory.

Obviously, this can only be used for 'pre-defined' overlays that you create as part of the scenario.

Regards.
User avatar
Brent Easton
 
Posts: 3226
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Overlays

Postby Cattlesquat » October 5th, 2020, 10:24 pm

I'll mention that I have also done this "province-by-province" for the All Bridges Burning (COIN) module -- each province has a large overlay piece with a Non-Rectangular trait so that it only accepts clicks "on the actual province", and I made those pieces non-movable and turned off band-selecting for them (so you can band-select pieces in them without getting the province).
User avatar
Cattlesquat
 
Posts: 942
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Overlays

Postby tinjaw » October 6th, 2020, 12:24 pm

Thanks for the suggestions folks, but what I require is something much more dynamic. If you are familiar with kml/kmz files, that is close enough to what I need to be used as an example. I need to be able to load multiple kmz files as individual layers that I can turn on and off at will.
User avatar
tinjaw
 
Posts: 39
Joined: April 10th, 2020, 12:11 pm

Re: Overlays

Postby m3tan » October 7th, 2020, 2:53 pm

Brent,

I recall reading that Vassal performance relating to game maps directly corrleates to pixel count, not file size. I have a 7500x6000 map which doesn't presently have performance issues. What sort of impact would adding a dynamic at-start 7500x6000 overlay create? Is that going to divide map redraw performance in half? Does transparency reduce that performance load?
User avatar
m3tan
 
Posts: 209
Joined: August 12th, 2018, 11:49 pm

Re: Overlays

Postby tinjaw » October 7th, 2020, 2:57 pm

I did come up with a limited solution that fits my needs.

I place several game pieces in the exact center of the map board. I add one layer to each that is a transparent image the size of the whole map board. I set the pieces to never be selected, moved, etc. I then toggle the active state of the layers of the pieces. This gives me several toggleable overlays per module.

Furthermore, in my particular use case, I replace the images in the module every game turn and redistribute the new version of the module to the players.
User avatar
tinjaw
 
Posts: 39
Joined: April 10th, 2020, 12:11 pm

Re: Overlays

Postby m3tan » October 7th, 2020, 3:12 pm

tinjaw wrote:Thanks for the suggestions folks, but what I require is something much more dynamic. If you are familiar with kml/kmz files, that is close enough to what I need to be used as an example. I need to be able to load multiple kmz files as individual layers that I can turn on and off at will.

I think you can do something like this with the built-in functionality of Vassal. At least theoretically - I have no idea about the actual performance or UI experience. Create a map with a blank transparent PNG image. Define all zones, regions, or hexes on that map even though the image is blank. Game pieces only interact with that top "layer". Create multiple maps underneath that map for each keyhole markup. Again a PNG with a transparent background so you can see all layers below. For each keyhole map, check the box "Include toolbar button to show/hide". I've never tried this, but it should work in theory...
User avatar
m3tan
 
Posts: 209
Joined: August 12th, 2018, 11:49 pm

Re: Overlays

Postby m3tan » October 7th, 2020, 3:20 pm

Haha. I was typing my next response when we cross posted. Glad you figured it out...
User avatar
m3tan
 
Posts: 209
Joined: August 12th, 2018, 11:49 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 4 guests