Tips for communication between JS browser game and node.js server?

Posted by Petteri Hietavirta on Game Development See other posts from Game Development or by Petteri Hietavirta
Published on 2010-10-23T15:33:59Z Indexed on 2011/03/19 16:18 UTC
Read the original article Hit count: 297

I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side.

The data sent over would consists of position of each player, direction, velocity and such. The player movements are simple force physics, so I should be able to extrapolate movements before next update from server.

Any tips or best practices on the communications side? I guess web sockets are the way to go. Should I send information in every pass of the game loop or with specified intervals? Also, I don't mind if it doesn't work with older browsers.

© Game Development or respective owner

Related posts about network

Related posts about multiplayer