arcomage / arcomage-hd

Web-based, free and open source, remastered 3D clone of 3DO/NWC's 2000 card game Arcomage. 13 languages. Desktop or mobile Android iOS. Online or offline PWA. Against AI or Multiplayer (w/o server). 🧝👾🃏 (ts+react+redux+rxjs, CSS-based anim, WebRTC)

Home Page:https://arcomage.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Card could be mistakenly drawn to the opponent and stop the multiplayer game

tomchen opened this issue · comments

In high latency connection, if multiple actions are pulled and executed together (because early instruction arrives late), the said problem could sometimes happen.

Maybe not related to #27, but to be investigated.

Samples:

// pulled (executed):
[
  {
    kind: "INST",
    data: { type: "DRAW_CARD_TO_QUEUE", n: 47 },
    seq: 47,
    gameNumber: 1619018788722,
  },
  {
    kind: "INST",
    data: {
      type: "PLAY_CARD_TO_QUEUE",
      payload: {
        type: "USE_CARD_CORE",
        n: 4,
        index: 3,
        position: 3,
        owner: "opponent",
      },
    },
    seq: 48,
    gameNumber: 1619018788722,
  },
  {
    kind: "INST",
    data: { type: "DRAW_CARD_TO_QUEUE", n: 62 },
    seq: 49,
    gameNumber: 1619018788722,
  },
];
// pulled (executed):
[
  {
    kind: "INST",
    data: {
      type: "PLAY_CARD_TO_QUEUE",
      payload: {
        type: "DISCARD_CARD_CORE",
        index: 16,
        position: 3,
        owner: "opponent",
      },
    },
    seq: 119,
    gameNumber: 1619026552609,
  },
  {
    kind: "INST",
    data: { type: "DRAW_CARD_TO_QUEUE", n: 41 },
    seq: 120,
    gameNumber: 1619026552609,
  },
];

I'm closing this issue in favor of the reopened #27