[ENet-discuss] Another few questions ^^

Bjørn Lindeijer bjorn at lindeijer.nl
Wed Oct 29 13:04:54 PDT 2008


On 10/29/08, Peter Soxberger <Peter.Soxberger at gmx.net> wrote:
>  -I want to create a "playername system" which keeps playernames actual on all PCs. Can I use the peer->data field for this? How is this handled? Is the data sent every time I send something (=> lots of traffic) or only if the data has changed?

Of your questions, I can unfortunately only answer this one. The
peer->data field is for associating _local_ custom data with a peer.
ENet doesn't do anything with it.

If you want to synchronize player names, you will need to implement
that yourself. A common solution is to have a server that keeps track
of all names, and sends this list of names as well as changes made to
it (usually in response to messages coming from clients) to all
clients.

Regards,
Bjørn


More information about the ENet-discuss mailing list