frankobjank / natac

Free & open source networked game implemented in Python, inspired by Klaus Teuber's Settlers of Catan for MacOS and Linux.
1 stars 0 forks source link

Redundant Packets #11

Closed frankobjank closed 3 months ago

frankobjank commented 3 months ago

More redundant packets should be sent from the server. The state should be sent about once a second so that even if a packet is dropped, it can be recovered within a second.

During playthrough, a packet dropped and players had to restart client to get updated. Current comparison of last state sent to client to current state sent to client is not useful since server is not receiving confirmation from client. Should remove this check so updates will be sent more frequently.

frankobjank commented 3 months ago

Server was not sending anything back if client did not reach out, so the client now sends a b'null' message every .7 seconds so that the server sends back the state every .7 seconds.