VASSAL as a game engine

Please take a look at a movie made from my module for Vassal dealing with one of my favorite games - Red Star Rising.
The file is a 2:11 movie in xvid format, weighing 12,4 MB.

Thanks to “a bit” of coding (but relatively small comparing to Vassal base) it’s easy to make a real working computer wargame, not only a sandbox where you have to move everything manually. Gameplay is 10 or more times faster and it’s impossible to forget important parts of the rules (like it happened to me every time I played in “manual” mode and for example using air force in mud turns).

Something like 90% of the game sequence is coded, with minor things left to do like game ending, placing airborne and partisan units, repositioning partisans, evacuation of factories. And of course a number of bugs that may be hidden somewhere :slight_smile:

My hope is to release the module on 22nd June (if it will be legal of course, if not - I will just play it with my friends)…

I am posting it here, because I’m interested what do you think about it.

How did you do the select piece, and highlight the possible movement area? Some custom java extension or activation of layers? I have a need for such a tool. Any words of wisdom?

Don Holt

This is indeed amazing!
Will you make available the code you developped?
Do you think it would be a good kickstart for inspiration for those that never coded for Vassal?

It is indeed a custom Java code “injected” into Vassal module, unfortunately it’s impossible to do such things with normal components available in Vassal.

The code is already available in it’s current form in my branch (morvael) of the official repository. Be warned that it’s constantly evolving as it’s not yet finished so it changes from day to day (I do a lot of refactoring when I think it will do good), plus the module has not yet been released so you will miss the “normal” part of the module in the repository.

Basically I have started with a code that Brent created for A Victory Lost (TerrainHexGrid), and then added a lot of mine, which resulted in what you can see now.

Thus spake “morvael”:

I saw a lot of the work you did come across the SVN log list. Is there
anything in particular you learned from this which could help improve
VASSAL, or code you’ve written which you think we should fold into VASSAL


Messages mailing list …

Post generated using Mail2Forum (

I believe most elements (except of course those dealing with specific game rules) could be used, but only by people wishing to code their own game in similar fashion. I think none of those elements would be of use to people who use only Vassal module editor and have no programming knowledge.

First, there is this TerrainHexGrid by Brent, which even has a GUI editor, but the terrain hex map you will create with it can then only be used in the code and is of no use in normal modules.

Then there are some elements that you can import in the editor and use them, like TerrainMapShader or RsrButton, but they are just a “link” to the code elements (the button executes some code you tell him to run, the shader shows area covered by certain rule but it also requires a class extending TerrainMapShaderRule that will “tell him” what to shade.

Of course then there is a lot of know-how in my code that shows how easy is to actually make a computer game with Vassal - you just have to operate a few commands (move piece, set property, log text) and have a custom PieceMover extension that will bind the movements on the map to your code. All this took me a bit of time to figure out and is there for the people to examine, but I guess there’s not much there that would fit into “GUI-editor only” mode.

Well, I dug through the code once to add a feature(at least half of one, thx to the real coding group) I wanted, guess it’s time to do it again.

I had another question about VASL maps. I assume that these are in some java based image file, rather than a png?(like the a java wrapped png?)

Thus spake “dcholtx”:

Last I checked, they were GIFs. We don’t use any custom image formats for
image storage, so far as I know.


Messages mailing list …

Post generated using Mail2Forum (

On 31/05/2009 at 6:35 AM dcholtx wrote:

A VASL map file is a Zip archive that contains a number of files:

  • A Gif image that is displayed on the screen.
  • A binary file containing LOS information. It essentially contains one entry for each pixel on the map specifying the elevation and what sort of terrain it it is. This is used by the VASL LOS engine
  • A bunch of files containing SSR and overlay information used to transform parts of the board into different terrain for different games.

This is all supported by a large chunk of custom Java code included in the VASL module.


Messages mailing list …

Post generated using Mail2Forum (