weird timing bug drawing from deck

This is in the context of designing a VASSAL module for the card game Wizard…
I have a single card deck where everyone draws from. Now we have seen cases when multiple people who attempt to draw multiple cards from the deck, there is a timing issue where some card was draw by player A but then ended up in Player B’s hand (and player A is now one card short).

Is that expected behavior? If it is is there a remedy where we can guard this from happening? (In our game we get around it by making sure only one person is drawing at a time, then give a signal via Skype before the next person can draw.

I have experienced this same issue. I have a module where players draw from 1 of 4 resource decks based on dice rolls. It often happens that multiple players are drawing cards at the same time. You pull the card to your hand, only to have it disappear. I also noticed when view other players hands that have had this happen to them, I can see Ghost cards in their hands. In other words, I can see an image of the card, but they can’t.

I would also like to know if there is an easy way to prevent this other than enforcing manual player order drawing!

Sounds like Vassal’s multiplayer code is having a hard time with asynchronous drawing from the same-deck-at-the-same-time by multiple players at once.

A workaround that could make the situation more orderly (and avoid having to manually semaphore each other over e.g. skype) would be a button that one player (“the host” - or really any player you’ve all agreed on) presses at the beginning of the turn, firing a sequence of triggers that then calculated how many cards (and which types) everybody needed, and then using Global Key Commands to auto-draw them to the players’ separate hands all at the same time. I’m not saying that’s “super easy to set up”, there’s some work involved, but it should solve your problem.

Thanks Cattlesquat, that should work.

One weird thing is that in the game I am working on (Imperius), each draw is 5 cards, but the deck can run out, and then the discard deck will then have to get shuffled in. My understanding is that if I do the automation as suggested there is still a timing bug when people are drawing and cards are getting shuffled, there is that timing bug still…

If you use the approach I’ve described, you can incorporate the reshuffling-if-needed automatically into the flow, and it will similarly work around / prevent any asynchronicity problems you’re encountering.