Page 2 of 2
Re: Performance Issues in later game
Posted: Wed Jul 09, 2014 6:42 am
by dmantione
Sounds goood. Just curious, making the server wait sounds counterintuitive. What makes it more efficient to do so?
Re: Performance Issues in later game
Posted: Wed Jul 09, 2014 2:02 pm
by void
The server processes the turn, that is AI planning, resource calculation, research and production, unit healing etc., and finally executes the set orders for all units and operations. When game objects change the data is sent out to the client(s), and especially in late game processing all the data along with updating their visualization can take multiple seconds on a client.
If a unit e.g. moves between two tiles it changes on the server from an IDLE state to a MOVE state that lasts around 1 second, and back to an IDLE state. However, since the client is busy for multiple seconds processing the previous updates along with their visualization, those unit state changes were buffered up and he'd process them over 1 or 2 frames -- thus causing units with orders to instantly jump to their target territory at the start of the turn. Now the server waits until each client has processed and updated the non-unit/operation data + visualization before moving onwards to unit and operation order execution, basically synchronizing the turn processing between client and server to compensate for heavy load on the client's side.