Lucas Beyer
2012-10-02 13:20:35 UTC
Hello,
My gameserver runs in ticks (0.1-0.01s). Each tick, events happen,
which need to be reliably sent to the clients.
Is it better to
a) each tick, send one big message containing all events which
happened during the tick or
b) send each event (~10-20 bytes) as a separate message during the tick?
As I understood, messages are only really sent through the wire during
a call to enet_host_service, right? I call this between two ticks, so
in both cases a) and b) would send the message(s) at the end of the
tick.
I know the best answer is "implement both then measure" but I was
wondering if, in enet and considering they all need to be reliable
messages, there are reasons why one might be inherently better than
the other. "big" is around 10-20 kilobytes.
--
Best regards, Lucas
http://arkana-fts.org
My gameserver runs in ticks (0.1-0.01s). Each tick, events happen,
which need to be reliably sent to the clients.
Is it better to
a) each tick, send one big message containing all events which
happened during the tick or
b) send each event (~10-20 bytes) as a separate message during the tick?
As I understood, messages are only really sent through the wire during
a call to enet_host_service, right? I call this between two ticks, so
in both cases a) and b) would send the message(s) at the end of the
tick.
I know the best answer is "implement both then measure" but I was
wondering if, in enet and considering they all need to be reliable
messages, there are reasons why one might be inherently better than
the other. "big" is around 10-20 kilobytes.
--
Best regards, Lucas
http://arkana-fts.org