When using a Client-Server model, it's necessary for those two parts to communicate data back and forth. There is one specific area that I've been thinking about and unsure about. That being putting certain information in a main update packet, that is sent every n milliseconds, or send it once when it happens. An example would be a turn-based strategy game. When one player's turn ends, and the next player's turn starts, you could send one packet to notify the clients of the change, or every n milliseconds, tell the client whose turn it is and it can determine when it changes. These are the pros I see to these approaches:
Inside Update Packet:
- Harder to become desynced if packets are lost, whereas if sent as an individual packet and the client fails to receive it, could create big desync issues.
- Sends less data between the server and client since it only sends it once, instead of every n milliseconds.
I'm fairly new to game design, so I'm not sure if there is a general consensus about the proper way to do this. There may also be another solution that I haven't thought of. Any input would be great.