2 ms·
I would say not many data structures requires hierarchy, which kinda is the point of JSON or XML before that. Those structures that do, are often persistent; s
by bullen 4y ago
I would say not many data structures requires hierarchy, which kinda is the point of JSON or XML before that.
Those structures that do, are often persistent; so the right trade-off might be to make your protocols more lightweight (I use |;, separation of just text) and then use JSON for your database objects (fits well with my |;, separators).
Here are two examples of "packets":
Movement: "move|<session>|<x>,<y>,<z>|<x>,<y>,<z>,<w>|walk" (where x,y,z,w are floats)
Storage: "save|<session>|{"name": "torch", "amount": 3}"
You can read more here: http://fuse.rupy.se/doc/game_networking_json_vs_custom_binary_protocol.txt http://fuse.rupy.se/doc/game_networking_json_vs_custom_binar...