They either need to do scoring server side, or there needs to be some sort of locking.
They either need to do scoring server side, or there needs to be some sort of locking.
It does create some problems when some clients have high latency and don't detect the formation in time, but I think it's fixable. One way could be to make the computation redundant, e.g. get three pixels to do the detection instead of one, and consider the formation valid if 2 out of 3 of them report success.
This might be completely over the top but perhaps you should look into lag compensation technique that FPS games use. There is a global state on the server and the clients send their command with a timestamp. The server then looks at the global state XXXms ago.
You're going to need global state and scoring if you ever want a leaderboard (otherwise people will just game it).
You could also just make it so that it doesn't show the clock during the last three seconds or something. Show "calculating..." or something and give people whatever the greatest lag time is grace period.
Anyway, great game. You got my vote.