Synchronizing.. please some tech support?

Apologies if I have to ask this again but I am experiencing disastrous failures synchronizing an online game with the module I am developing.

Please can any Vassal developer explain what I am doing wrong or what could be the problem I fail syncrhonizing?
Ideally spend 5 minutes with me online at their most convenient time?

This is the procedure I am using:

  1. Start the game offline on both computers and set Preferences->Server->Peer-to-peer (but same problems with Vassal server)
  2. Start the game again online on both computers, computer A then invites computer B
  3. Create a room called “beta”, A and B both join that room
  4. Computer A starts the game and does nothing (he will have to choose a side among four, let’s say he picks RED)
  5. Computer B synchronizes with A and after a while receives the data but
    …a) he is not asked to pick a side, so he ends up entering as side RED (same playerSide, different playerName)
    …a) image not correct, some pieces showing which should be hidden underneath, some pieces not showing
  6. the game is screwed and nothing works from there

PLEASE, I beg for help! I am getting desperate. The module works fine offline in hot-seat mode (=Retire functionality).

Did you set the same password on both machines (or leave it blank on both)?

Darn… yes!

Ok, now I changed the password on one computer and picking different sides works.

However, computer B (synchronizing to A) still gets a messed up screen, with hidden pieces showing and some visible pieces not showing etc.

I am trying with 3.2.0 build 8070 and it’s a bit better. However, A (the “host” let’s say) seem to have all the at-start stack in the right order etc, whereas B has them in mixed up order.

I will do more test in 1 hour, but thanks for your reply!

Sigh, I have to take that back.

Both Vassal 3.1.18 and Vassal 3.2.0 build 8071 seem to have the same problems synchronizing.

Computer B (synchronizing to computer A) can see pieces/decks which are hidden under other pieces on computer A (as they should be) and/or he cannot see pieces that are normally visible for computer A (I suspect those are hidden underneath other pieces).

I think this bug might be related to the way at-start-stacks are rendered and synchronized (or not synchronized, rather…).

In my various Maps I have several at-start-stacks and decks, in different positions of the screen. Some of the at-start-stacks actually contain multiple pieces. Others actually are so big that hide other at-start-stacks previously defined in the given map. These big ones are defined last in the module and at the beginning of the game are supposed to cover the playing area and be removed later by some action/command.

On computer A everything fine as planned. Every at-start-stack is rendered in the order defined in the module editor. Every piece in a given at-start-stack (say Piece 1 and Piece 2) is rendered in that order (thus Piece 2 on top of Piece 1).

On computer B, instead, the display of at-start-stacks does not seem to follow the definition order in the editor. In a random manner the big pieces which should be on top end up on the bottom. Similarly, some of the pieces contained in a same at-start-stack are also rendered in reverse order, at random.

Bad idea of relying on definition order in the editor (and/or inside the same at-start-stack) or a bug that needs to be fixed?

The At start stack order doesn’t magically change how it is displayed between players when you synchronize and the display state is always the same for both players (except where masks / invisible / ownership /private windows etc…are involved). if it were a bug, a lot of other modules would have screaming users and it is remarkably quiet in that regard - sorry to say but it is something you are doing

Are you using the exact same version of the module when synching? Different versions might have different Game Piece Layer ordering.
Did you even define any Game Piece Layers?
Are you absolutely positive you have synched properly? - test it - moving one piece on one computer should show the same movement on the other computer
Are there any special conditions involved on the pieces (like masks, invisible traits etc…)?

There are a lot of things it can be that the designer is simply missing (like list above for example) and most of the more weird things we aren’t going to be able to diagnose without seeing the module do these things ourselves so we can replicate it / look inside and see what it is you are trying to make the module do etc…

I am using the exact same module version, as mentioned in the original post. Yes, of course I am using layers in my module - I am not that clueless - but not for this particular situation.

It is not a layering problem because we are talking of different pieces here: piece 1 (a miniature) should be on top of piece 2 (a card) but, while it’s ok for computer A (the host), it goes on the bottom for computer B (the client), instead.

If it was a layering problem or something weird/wrong/badly designed or whatever I do… then I think it should show wrong for the host as well, shouldn’t it?

Do you have 5 minutes to try this online yourself, alone or with me? It is just 5 minutes:

  1. you start the game, pick any side, and without synching you see all miniatures on top of their cards, close the game

  2. you start the game again, come online, synching with me or with your second computer and you see some miniatures on top of their cards (as it should be) and some hidden below their cards… randomly (try quitting and restarting and this time other miniatures will hiding)

I’ll give it a try. Where is the module posted for download?

Please check your message box for the URL. I am online now, if you want.

where is the module

PM sent

I am not talking about layer traits. See Game Piece Layers in the manual. They control how pieces are drawn on top of one another. A look inside your module shows right away you are not controlling your pieces with Game piece layers. Lets start there

Ah, those, ok ;)

Yes, I noticed time ago that functionality but didn’t make use of it.

Since I am not using Game Piece Layers shouldn’t all pieces be in the same layer? If so, who controls - if anyone - which piece goes over and which under? I thought it was the order in at-start-stacks and, between at-start-stacks, the order in which they are defined in the given map. It surely seems to work like that in single player/hot seat.

Is it then not guaranteed to be so after synchronization and should I enforce Game Piece Layers? No problem if I have to, I am just keen to make it work and to learn what I was doing wrong.

I actually found this problem behavior both when opening it alone, and when synchronizing on two machines. Those little superhero pieces on the cards would become invisible as soon as I clicked on them. It’s not clear if they are appearing under the cards, because the cards can’t be moved. Nor can the hero pieces. But it’s definitely not an issue with synchronization.

The lack of game piece layers seems like a likely suspect. If you always want one piece to appear on top of another, Game Piece Layers are the way to go. Pieces of wildly different sizes, like the superheroes and their cards, don’t work well when stacked with each other. Try adding them to the superhero maps. If they are in different GPLs, you can still include them in the same At-Start stack.

You have created an extremely complex module. Some of your pieces have dozens (and dozens!) of traits and hotkeys, plus triggers and prototypes. It’s very impressive, but it will be quite a forensic job to diagnose any issues with it like this.

Also, on a more minor note, can I suggest you not package your vmod file in a zip?

No, wait, the cards underneath are normally set to DOES NOT STACK “never/never”. Thus, when you click on the miniatures they don’t disappear. I have done tons of test for weeks with this, in hot seat mode, and they don’t disappear. No problem there.

However, In the version I sent you I changed the cards to “normally/never” so you could select them and click UP/DOWN arrows to actually check that the miniatures had been sent under by the “failed” synchronization. You cannot move the cards but you can click UP/DOWN on them and, when you do, the miniatures will come up (or go back down).

Anyway, it is annoying to find out that the at-start-stack order defined in the module is no guaranteed to be respected after synchronization (I don’t see any other explanation to this issue…?). But I thank you both for the suggestion to use Game Piece Layers to overcome this problem. At least there seem to be an explanation and a way out, I am no longer thinking I spent months creating just a complicated solitaire-only game :slight_smile:

I am actually thinking I could possibly go experiment another way first, that is: leave only the cards in the map at game start and have the setup procedure “PLACE MARKER” on top of them from the pool of game pieces. The PLACE MARKER should be guaranteed to stay on top, I think?

This would be preferable procedure in the end, if it works, because I am thinking of putting all cards themselves in the game pieces pool and place them on the board automatically at game start, for the given language choice (at the moment I only have the Italian version scans so I put them in place with at-start-stacks). So, 1) place card from pool first (for the given language), 2) place miniature on top. Hopefully there will not be synchronization problems and they will stay on top.

Anyway, thanks a lot for taking time to go through this, much appreciated!

P.S. Will avoid zip next time. Didn’t know there were problems with it.

Hmm… or maybe not… If the synchronization process just send a list of pieces like “there is this piece there, this other one there, etc” without passing on the information on how it was setup (and in particular which piece is on top of the other) then place-marker will fail just the same as at-start-stack… I do need Game Piece Layers then, I guess.

I just tried game piece layers and it works nice and easy with normal pieces/cards. Thank you for the suggestion, that is half of my problem solved, now. The other half left is that game piece layering doesn’t seem to work with decks, though. I am not talking about synchronization issues here, just single player offline tests.

For example, I have Bottom and Top layer. Then I have a deck of cards with all cards set with Layer=Bottom. On top of the deck I put some other piece with Layer=Top, just because I want to hide the deck at the start of the game, say.

It will not work, the deck will stay top. Masking is not the issue, tried with and without. On the other hand, dragging a card away from the deck will then go to the bottom as expected.

A “switch bottom layer off” command won’t have any effect on the deck of, supposedly, bottom cards (while the card removed from the deck will).

Therefore, one could infer that decks pay no heed to Layering (which is unfortunate for my case, sigh).

However, the very “funny” thing is that If I add a game piece layer control of type “rotate layers up” and click on it then the deck will finally go down to the bottom. So, the Layer marker is finally checked also for the contents of a deck, but not at the start of the game.

Also somewhat bewildering is that any unlayered piece will be top of everything, including the deck at the start of the game. After clicking the rotate layers up button, it will go below everything except the deck (it will stay over the deck even if showing below the single card removed from the deck). Having “skip layers with no counters” checked/unchecked in the rotate layers command doesn’t make any difference (what is is supposed to do?).

I have attached a sample module to reproduce this. Any clue how to make the deck be bottom at the start of the game?