1
\$\begingroup\$

I am building a game that uses client-server architecture and have the following question regarding server to client updates.

Currently the server is doing 60 ticks per second and is sending updates to the connected clients after every step, this means information about every entity that is in the world. Since my game is rather slow and rts based, a lot of the entities do not change state after every step and do not need to be updated. So to reduced server load I added an update queue. Only entities that require an update are added to this queue and it is executed after each step.

Looking at this approach I wonder if there are any significant disadvantages to it. One I could think of is that maybe as the time goes by and the game gets more complicated all the entities will need to be updated on every step anyway and that might be just a waste of time to implement.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You're worried that if you optimize something now, it might turn out to be wasted effort in the future.

But more importantly, if your system is working now, as-is, then it's wasted effort here in the present!

That said, minimizing server-client traffic is generally a good idea, especially if the clients are out in the real world, on unknown networks, and so on. In that case you'll also need to deal with recovering state from short outages and crashes, so at least sometimes you'll probably need to send the entire state.

But for now, if it works as-is, stop, and move on to the next bit.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .