nodegame
nodegame copied to clipboard
Replying node.on.done on localhost might send msgs too early
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.
Problem is perhaps specific to single-players with step-rule SOLO.