•      Sign In
• Create Account

### #ActualMedo3337

Posted 21 January 2013 - 02:05 AM

Okay, starting from number 1:

Should I gather all the information and send them like this (each message contain all the commands):

// One single packet:
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

[Particle]
[
[PARTICLE_TYPE] (32 bits)
[PARTICLE_X] (32 bits)
[PARTICLE_Y] (32 bits)
[PARTICLE_Z] (32 bits)
]

OR should I send one command per message instead:

// Only one single command per message
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

2. Can I send binary data instead of plain text? I don't want the data to be readable by human.

3. The problem that I think of is that data sent over UDP is not guaranteed to arrive each time, so when I send particles command for example I only send it ONCE and if it didn't arrive to the client that will be a problem.

### #5Medo3337

Posted 21 January 2013 - 12:58 AM

Okay, starting from number 1:

Should I gather all the information and send them like this (each messages contain all the commands):

// One single packet:
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

[Particle]
[
[PARTICLE_TYPE] (32 bits)
[PARTICLE_X] (32 bits)
[PARTICLE_Y] (32 bits)
[PARTICLE_Z] (32 bits)
]

OR should I send one command per message instead:

// Only one single command per message
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

2. Can I send binary data instead of plain text? I don't want the data to be readable by human.

3. The problem that I think of is that data sent over UDP is not guaranteed to arrive each time, so when I send particles command for example I only send it ONCE and if it didn't arrive to the client that will be a problem.

### #4Medo3337

Posted 21 January 2013 - 12:58 AM

Okay, starting from number 1:

Should I gather all the information and send them like this (each messages contain all the commands):

// One single packet:
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

[Particle]
[
[PARTICLE_TYPE] (32 bits)
[PARTICLE_X] (32 bits)
[PARTICLE_Y] (32 bits)
[PARTICLE_Z] (32 bits)
]

OR should I send one command per message instead:

// Only one single command per message
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

2. Can I send binary data instead of plain text? I don't want the data to be readable by human

3. The problem that I think of is that data sent over UDP is not guaranteed to arrive each time, so when I send particles command for example I only send it ONCE and if it didn't arrive to the client that will be a problem.

### #3Medo3337

Posted 21 January 2013 - 12:57 AM

Okay, starting from number 1:

Should I gather all the information and send them like this (each messages contain all the commands):

// One single packet:
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]

[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

[Particle]
[

[PARTICLE_TYPE] (32 bits) [PARTICLE_X] (32 bits) [PARTICLE_Y] (32 bits) [PARTICLE_Z] (32 bits)

]

OR should I send one command per message instead:

// Only one single command per message
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

2. Can I send binary data instead of plain text? I don't want the data to be readable by human

3. The problem that I think of is that data sent over UDP is not guaranteed to arrive each time, so when I send particles command for example I only send it ONCE and if it didn't arrive to the client that will be a problem.

### #2Medo3337

Posted 21 January 2013 - 12:56 AM

Okay, starting from number 1:

Should I gather all the information and send them like this (each messages contain all the commands):

// One single packet:
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]

[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

[Particle]
[

[PARTICLE_TYPE] (32 bits) [PARTICLE_X] (32 bits) [PARTICLE_Y] (32 bits) [PARTICLE_Z] (32 bits)

] // Etc...

OR should I send one command per message instead:

// Only one single command per message
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

2. Can I send binary data instead of plain text? I don't want the data to be readable by human

3. The problem that I think of is that data sent over UDP is not guaranteed to arrive each time, so when I send particles command for example I only send it ONCE and if it didn't arrive to the client that will be a problem.

### #1Medo3337

Posted 21 January 2013 - 12:55 AM

Okay, starting from number 1:

Should I gather all the information and send them like this (each messages contain all the commands):

// One single packet:
[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]

[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
];

[PLAYER_POSITION_MESSAGE]
[
[PLAYER ID] (32 bits)
[POSITION_X] (32 bits)
[POSITION_Y] (32 bits)
[POSITION_Z] (32 bits)
]

[Particle]
[

[PARTICLE_TYPE] (32 bits) [PARTICLE_X] (32 bits) [PARTICLE_Y] (32 bits)[PARTICLE_Z] (32 bits)

] // Etc...

OR should I send one command per message instead:

// Only one single command per message [PLAYER_POSITION_MESSAGE] [ [PLAYER ID] (32 bits) [POSITION_X] (32 bits) [POSITION_Y] (32 bits) [POSITION_Z] (32 bits) ]

2. Can I send binary data instead of plain text? I don't want the data to be readable by human

3. The problem that I think of is that data sent over UDP is not guaranteed to arrive each time, so when I send particles command for example I only send it ONCE and if it didn't arrive to the client that will be a problem.

PARTNERS