Application
I am working on an MMO and have run into an issue. The MMO server I've built is fast and locally sending messages to my game client every ~50 milliseconds on UDP sockets. Here is an example of a message from sever to client through my current message system:
count={2}body={[t={agt}id={42231}pos={[50.40142117456183,146.3123192153775]}rot={200.0},t={agt}id={4946}pos={[65.83051652925558,495.25839757504866]}rot={187.0}}
count={2}, 2 = number of objects
[,] = array of objects
I built a simple text parser, code: http://tinypaste.com/af3fb928
I use the message like :
int objects = int.Parse(UTL.Parser.DecodeMessage("count", message));
string body = UTL.Parser.DecodeMessage("body", message);
for (int i = 0; i < objects; i++)
{
string objectStr = UTL.Parser.DecodeMessage("[" + i + "]", body);
// parse objecStr with UTL.Parser.DecodeMessage to extract pos & rot and apply to objects
)
Issue
When I have more objects ~ 60+ the performance dramatically decreases.
Question
What is standard method for packaging and reading message between clients and server in MMOs or real-time online games?