Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Is there any reason why the game code is 'untrusted'? All you should need to do is to validate the JSON input and that the move does not violate any rules. Without knowing more details, I'm not sure I can give advice on how to resolve disputes between clients, but I see no reason why the game code cannot be trusted.</p> <p>This problem actually sounds similar to <a href="http://gram.cs.mcgill.ca/theses/chen-10-distributed.pdf" rel="nofollow">a paper I read on distributed collision detection and resolution</a>, which reduces server network stress. This is accomplished by having all 'clients' vote on a future state that is predictable, where each client directly . If there is no contention, then an agreement is reached, and the game continues. If there is contention, and an agreement cannot be reached, the move is aborted.</p> <p>It also gives some interesting ideas for whether or not the vote is completed 'in-time' (you may not have to handle this scenario, given that your game is turn-based).</p> <p>Instead of having a move be aborted when a collision cannot be reached, you would have to write some logic to determine whether the move is valid or not. This is where it gets difficult to answer your question, as you don't seem to be able to trust anything except the server (which can't even trust the game code itself).</p> <p>I think that in order to solve this issue reliably, you would likely have to go with one of your existing ideas: firing up a sandbox game on the server, asking an unrelated client (this can be unreliable), or remove one of the constraints, and ask the server directly.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload