Generic lag compensation system for multiplayer javascript games.