Download

Synchronizing a new client with a server

Hello!
I made multiplayer (client-server model), but there was a problem:
When several players play, they change their nickname, interact with objects (move), and this information is replicated.
When a new player connects, he does not see the changes that were made before his connection.
But he sees if something changes at the moment.

I’m a beginner, but I suppose the problem is the lack of up-to-date information loading for the client.
Can you please tell me what I need to do?

Hi, avoid using multicasts for changing things that should persist. Use repnotify instead. If you use a multicast, then if a client don’t get it the moment the multicast is called, it never will. Therefore newly joined clients will never get it (and network relevancy also won’t work btw). If you use repnotify or replicated variables, then as soon as a client joins (or becomes network relevant), it will be updated automatically.

So go through all multicasts you have and make sure you’re not using them to change persistant things but only as one shot events (e. g. spawning an explosion would be fine via multicast, changing the nickname wouldn’t).

2 Likes