<story><title>Never trust the client</title><url>http://gafferongames.com/2016/04/25/never-trust-the-client/</url></story><parent_chain></parent_chain><comment><author>xenadu02</author><text>&amp;quot;Never trust the client&amp;quot; is good advice for &lt;i&gt;every&lt;/i&gt; kind of application. Clients are filthy liars.&lt;p&gt;Clients have bugs. Old clients don&amp;#x27;t upgrade. Packets arrive out of order. ACKs never make it to clients, causing clients to repeat what the client believes to be a failed operation. All of this is before even considering an attacker actively trying to subvert you.&lt;p&gt;The server should always be the source of truth. It should always enforce all the consistency rules. Database schemas can be a critical tool here as well.&lt;p&gt;Don&amp;#x27;t blindly slap whatever the client sends into a no-SQL database, then vomit it back out for queries.</text></comment>
<story><title>Never trust the client</title><url>http://gafferongames.com/2016/04/25/never-trust-the-client/</url></story><parent_chain></parent_chain><comment><author>vvanders</author><text>They missed one key bit on CS&amp;#x27;s network model(which is what made it so great) is that they would actually re-wind the gamestate to do hitchecks so you could have a latency of 200ms+ and have a reasonable experience.&lt;p&gt;Also the common term for resolving these types of things on the client is called &amp;quot;dead-reckoning&amp;quot;. You&amp;#x27;ve always got a diverging states from latency so you&amp;#x27;re continuously trying to reconcile this on the client.&lt;p&gt;Simple Newtonian physics based games(Subspace, etc) are famous for being latency tolerant since the simulation is incredibly deterministic and are based on the players extrapolating where things will be in X time rather than twitch responses(which is also why fighting games are so hard without using a solution like Counter-Strike). You could play SubSpace on a 500ms dial-up connection and still be competitive without needing to lead for lag.</text></comment>