title: Sync physics with a game server
body: <p>I wanted to write a multiplayer game using a physics engine. The client uses the physics engine for calculations and displays the results just in time, but of course, the server needs to simulate the whole thing, too.</p>
  
  <p>Afaik, clients usually send velocity and position to the server. My idea was to send the key presses to the server instead.</p>
  
  <p>Sending positions/velocity:</p>
  
  <ul>
  <li>Server needs to interpolate the movement.</li>
  <li>I have no idea how to feed a physics engine with this data.</li>
  <li>On interpolation, the results might not be exact.</li>
  </ul>
  
  <p>Sending key presses</p>
  
  <ul>
  <li>I can feed the server's physics exactly like on the client (by key presses). This means less code!</li>
  <li>No interpolation needed.</li>
  </ul>
  
  <p>So, what could be bad with my idea? Why isn't it (afaik) used in games?</p>