(note: I'm not asking for the supported formats in the RFC, but the format I should develop to send/receive the messages, say, in the Application layer).
(note 2: Please help me retagging this post to reference internet, communication, client-server messages).
I am developing a game. Right now it is just a concept of a multiplayer game, tile-mapped, with role-playing characters.
The big problem here? It will be online-massive. My concerns are about lag and transmission. The front-end will be pure ActionScript3. The connection will be done with websockets.
Certain actions will be really quick like: walk, grab (item) and perhaps hit (attack) or execute another type of quick action (e.g. use a small, quick, item).
Considering that websockets are not plain sockets, and this is my first online game, my question is about the protocol to use.
Right now, I marshall the messages in the following format (this is just an example, since I did not develop the actual commands yet):
client ---> {'code': 'walk', 'kwargs': {'direction': 'left'}} ---> server
server ---> {'code': 'walk.ok', 'kwargs': {}} ---> client
As you can see, it is JSON format, sent via websockets. The processing backend is Tornado with Python 2.7. I developed a library to marshal and unmarshal these messages.
Assuming that, as an expected peak (with so much luck), I will have 1000 players mostly walking... will I have performance issues with this protocol I defined? Actually, I'm asking about
I want to avoid lag as much as possible, considering websocket transmission.
What format is more adecquate and performant for MMORPG games client-server communication for these really-quick actions? Actually I never developed one of these games and I'm concerned about the performance.
So the question is: are you interested in bandwidth-frugal but relatively complex techniques like this, or would you prefer the human legibility of text key-value pairs as you describe above?
– DMGregory Apr 29 '15 at 17:22MMORPG
. If you really mean MMO, you're already in way over your head, because this is a very basic multiplayer scenario. See also: http://www.gamedev.net/blog/355/entry-2250155-why-you-shouldnt-be-making-an-mmo/ and http://gamedev.stackexchange.com/questions/90/why-is-it-so-hard-to-develop-a-mmo – jzx Apr 29 '15 at 18:31