27.11.2013, 10:11
Quote:
I tested this using SendClientMessage to All 33 times. Results show it's being run 19.5 times a ms. Isn't that too slow? If only sendclientmessage is taking so much time to execute how can someone keep it under 50 ms as you said. And yes, I've closed my being, browser and any other computer stuff before testing this.
|
Quote:
What level do you want? The "playerid" parameter is used to look up the IP and port (i.e. the socket) of a player, then the colour and text information is packed in to a packet and that is sent via TCP* to the specified socket (i.e. the player). Once there, the client checks the incoming message type and calls the relevant decoding code to extract the the colour and message and uses DirectX text operations to draw to the screen. There is also code to store the current message buffer and manipulate that to add things on to the end.
* Actually, it's sent via a custom UDP protocol, but it is similar to TCP in that is ensures delivery. |