I am not a game developer by trade but am working on a card game (that is real time, not turn based). I was wondering what the common mistakes are that people make when new to this sort of development so that I can avoid them!
The biggest mistake, is simply playing the games on the client side, and allowing them to communicate their information as they see it. Have the clients simply communicate their input, and render a model sent from the server at discrete intervals. (Store these models in an array with a server-timestamp, then interpolate between two known timestamps to render all actors everyframe)
I have created a framework specifically for creating HTML5 realtime multiplayer games, based on the Client/Server model. In this model, players send only input to the server (keys being pressed) - and the game occurs on the server.
The server sends timed world-snapshots to all clients, and clients render themselves say 75 ms back in time from the current time, by finding two known world updates their rendertime falls between.
Repository (contains 3 demos) https://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
Video Box2D demo in action: http://vimeo.com/24149718
Slides from JSConf 2011: http://www.slideshare.net/MarioGonzalez15/realtime-html5-multiplayergameswithnodejs-7868336
It's based on Quakeworld and Valve's Source engine whitepapers: http://fabiensanglard.net/quakeSource/index.php http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking