nodegame icon indicating copy to clipboard operation
nodegame copied to clipboard

Replying node.on.done on localhost might send msgs too early

Open shakty opened this issue 4 years ago • 1 comments

Usecase:

client:

node.done();

server:

node.on.done('X', (msg) => node.say('next step or this step?');

If the server is fast and client is slow the message might arrive after the client is DONE but before the client has started the new step (the stepping procedure is async to let local listeners finish). In this case, the message belongs to the previous step. Vice versa the message will be fired on the next step.

If messages are critical to be fired in the next (e.g., sending the payoff for the game to EndScreen), it will fail.

shakty avatar Aug 27 '21 11:08 shakty

Problem is perhaps specific to single-players with step-rule SOLO.

shakty avatar Aug 27 '21 11:08 shakty