Raw string or JSON format?

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

shaitaaan
Posts: 11
Joined: 02 Apr 2009, 04:29
Contact:

Raw string or JSON format?

Postby shaitaaan » 02 Apr 2009, 04:38

Hi,

I am just starting with smartfox server (with unity). I have to send around 20 messages per client to/from server. We have a max of 4 clients. What protocol would be better? JSON or raw strings?

Thank you in advance.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 02 Apr 2009, 08:49

Raw format is more compact and it's probably best for fast messages, as in your case.
Take into consideration that probably 20 messages/second is the almost the most you can get out of the network as 20msg/sec == 1msg every 50ms.

In other words a player will need a network lag <= 50ms in order to fully enjoy the game, and 50ms is a very good average ping time. Not everyone has that. Good values range from 50 to 100ms, 100-150 is considered not-too-good and 200+ms is usually bad for realtime games, or at least the game is likely to show some "stuttering".
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: Google [Bot] and 101 guests