Imagine a multiplayer board in which several people can draw at the same time. To make it simple, let's say that there is one object on the board that can be moved or deleted by any user. There is no concept of objects belonging to the user (i.e. it is important that any user is allowed to manipulate any object ... this is free for everyone)
My problem is that ... if two users try to make another action on an object at the same time, that is, one removes it, the other moves it, what happens?
Right now - just skipping messages, everything is in trouble.
One idea was to have a server control that decides who has control over the object and nothing is allowed to execute clientide until this conflict is resolved. Conflict resolution can be based on first come, first look principles.
Even if this can happen very quickly, a short delay (~ 50-300 ms) is unacceptable, since the movement should be instant on the client side. For example, instead of manipulating objects, think of a pen. That there was a delay while they already began to draw ... not good!
Another idea was to have a “management request” button that requests a serveride extension for control .... the same idea as before, but now they are not disappointed with the initial delay in drawing a pen. This is also not so good, though, since they have to hit this button until they can do anything, and this board is really intended for children ...
Any other solutions? :)
source
share