I need to keep the client updated on data that's rarely changed (like health) or when an event occurs (like when a player is attacked and should have "-10 hp" above him). Those 2 specific part should be interdependent btw.

I need a way to instantly send this data to clients (or just without big lag), without resending it too many times and I need to be sure the clients received it.

I cannot just send a request to the client when something happens, because I'll just be sending a lot of tiny messages to a lot of clients and that's bad for performance.

I was thinking of accumulating packets of data (per client) and sending them no more often than 5 times a second and then if the client doesn't say he got a package just resend it. This way if nothing happens there is no overhead and if a lot of events are going on I'm sending them in bigger packets.

Is my solution good?
Is there a better, more popular way of dealing with this?



You must log in to answer this question.

Browse other questions tagged .