Skip to main content
added 20 characters in body
Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342

I would invert the logic from "You are allowed to do anything unless the server told you there is an ongoing animation" to "You are only allowed to do something when the server tells you that it is your turn".

The result would be that any new player joins in a state where they can't do anything (because they didn't receive the "It's your turn" message yet). Their UI would not become active until the server tells them that it's their turn. Which it would do immediately when there is no ongoing animation, but would delay if there is an ongoing animation.

I would invert the logic from "You are allowed to do anything unless there is an ongoing animation" to "You are only allowed to do something when the server tells you that it is your turn".

The result would be that any new player joins in a state where they can't do anything (because they didn't receive the "It's your turn" message yet). Their UI would not become active until the server tells them that it's their turn. Which it would do immediately when there is no ongoing animation, but would delay if there is an ongoing animation.

I would invert the logic from "You are allowed to do anything unless the server told you there is an ongoing animation" to "You are only allowed to do something when the server tells you that it is your turn".

The result would be that any new player joins in a state where they can't do anything (because they didn't receive the "It's your turn" message yet). Their UI would not become active until the server tells them that it's their turn. Which it would do immediately when there is no ongoing animation, but would delay if there is an ongoing animation.

Source Link
Philipp
  • 121.5k
  • 28
  • 261
  • 342

I would invert the logic from "You are allowed to do anything unless there is an ongoing animation" to "You are only allowed to do something when the server tells you that it is your turn".

The result would be that any new player joins in a state where they can't do anything (because they didn't receive the "It's your turn" message yet). Their UI would not become active until the server tells them that it's their turn. Which it would do immediately when there is no ongoing animation, but would delay if there is an ongoing animation.