ArnoldSmith86 / virtualtabletop

a virtual surface in the browser on which you can play board, dice and card games
https://virtualtabletop.io
GNU General Public License v3.0
172 stars 31 forks source link

MOVEXY odd behaviour #1775

Open pounamu opened 1 year ago

pounamu commented 1 year ago

If you move a card with MOVEXY out of a holder that would not accept that card as a dropTarget it does not end up where it should.

Also, I have an older room with a MOVEXY based animation that used to work and now mostly doesn't .

I have made a demonstration of the first issue out of the Timer tutorial in this room https://virtualtabletop.io/snx9

Also in that room is the game Last Panther, I have an animation in there (based on the timer tutorial) that when a player plays a card (click to play) all the other players should see a card move from the top left corner of their seat to their holder for played cards. This worked last time I played in this room (4th March 2023) but now it is inconsistent, working as it should sometimes, but sometimes it shows as coming from the bottom left of the screen (where the holder it stays in when not in use is).

I have a version of the game where I have stripped as much as I can out of the undoTimer that doesn't relate to the animation and also the full game.

96LawDawg commented 1 year ago

Seems this is not just an issue with MOVEXY but also MOVE. If you try to do either to cards in a holder put there by recalling or setting, or whatever, but the dropTarget and the cards don't match up, then the MOVEXY or MOVE fails.

@pounamu, for what it's worth, there is a better way (a VTT-supported way) to do animation not using timers. Look at the CSS: Transition tutorial.

pounamu commented 1 year ago

@96LawDawg Thanks, I was planning to look into that, since I saw you don't have a timer for the animation in your card games room.