Today I started by trying to implement a system to exchange timestamps and sync the global time/ I then stopped because it's not clear to me how to cope this with the absence of connections in UDP. An example: if a client starts sending data before syncing, and then syncs with the server, every time value used until then must be somehow adapted, and everything can get messy, so before I have a clear idea of where to go I'll wait implementing this.
So i then proceeded to fix a bug I had during disconnections: a flood of "failed recv" messages.
I fixed it and I decided to take it one step further and write a system that delete every object who hasn't received data from the network for a long time. To do that I also had to refactor huge chunks of the code, including the abstraction of the NetworkScene in a Base component that allows the child scene to only handle game related code.
Nessun commento:
Posta un commento