title: Easeljs - smooth animation over socket.io and nodejs
body: <p>I am developing a multiplayer game with socket.io (nodejs) on the serverside and easeljs on the clientside. Until now it is really simple, you can move a rectangle over a canvas element and the position update is send to the server and it broadcasts the position to the clients. The traffic is not the problem because only two users can be play against each other which is handled with the room feature in socket.io. The drawings and gameloops are realized with easeljs.</p>
  
  <p>The problem I have is that the movement is not very smooth for the other player. The position update is really very fast (and enough for hit collision etc.) but of course not so smooth for the player who got the position update over the server.</p>
  
  <p>How can I smoothen the animation? Currently I am creating a new Container class and update the position of the container like</p>
  
  <pre><code>myContainer = new MyFigure()
  on('positionupdate', function(data) {
      myContainer.x = data.x
      myContainer.y = data.y
  });
  </code></pre>