Are only objects that have changed updated?

Apr 7, 2009 at 5:25 AM
are only objects that have changed updated?

i.e.  i changed the serialization to include a Vector2.

if a tank only moves up i have to resend all the Vector2(2 floats) but in the original way i only had to send a single Int.

if its constantly sending info regardless of if it has moved or not then this wouldn't matter.



and, if it only updates changed objects then is there a method i can call where it would send information about every object it keeps track of?   i.e. make sure everything is synced up?

Thanks,
Ryan
Coordinator
Apr 7, 2009 at 8:44 AM
Hi,
1. yes, only if a property changes, the distribussion session will update all clients.
2. this method doesnt exist, but I am going to implement one for synchronizing a client who has just connected to a session, so he gets all distributed objects after joining..

David
Sep 3, 2009 at 2:54 PM

 

Hi

I was looking for information about this.

Im trying out the outcast game, to try understand how it works.

But starting 1 server, and many clients, the clients does not get updated with the allredy existing space ships, from the server, and the other clients made.

Bbut those clients allredy existing when creation a new client, can see the new one.

is there a way to fix this with an existing function call? or is this the problem you described?

and is it still on your TODO list?, its a few months ago...

Thanks,

Silver

Coordinator
Sep 3, 2009 at 3:28 PM

Hello,

in the current release, upon connecting to server, the full-retrieval of all existing distributed objects from the server is not done automatically. This is because there can be too many distributed objects on server-side so synchronizing the client with server can be expensive.

If you want to get all the distributed objects from server upon connecting, you can easily implement it by yourself.

Actually there are too ways for network games: 1. Lobby,    2. Free-connection

As for the lobby (RTS games):

1. Server starts the "lobby"

2. Clients connect to "lobby"

3. If all clients are ready, game-state is changed from "lobby" to "started" : this means all clients start with the same world-state, e.g. no connected syncro is needed.

 

As for the Free-connection:

this means that all clients are allowed to connect/disconnect as they like (fps games). If one connects, it must be syncro with server (this is what you want).

Depends what game you are developing. The lobby-network game is less painfull to implement as the free-connection.

Hope this helps!

David

 

Sep 4, 2009 at 2:58 PM

Thanks for the answer ;)

Silver.

Oct 6, 2009 at 4:06 PM
kaleta wrote:
Hi,
1. yes, only if a property changes, the distribussion session will update all clients.
2. this method doesnt exist, but I am going to implement one for synchronizing a client who has just connected to a session, so he gets all distributed objects after joining..

David

Anyidea when this kind of feature would come? I see you have planned releases. This would be very nice feature.

Coordinator
Oct 6, 2009 at 4:09 PM

its quite easy so maybe I do it today in the evening if i come back from work.. will update if I have done so!

 

 

Coordinator
Oct 7, 2009 at 2:24 PM

 

Ok I have added the feature, if a new client connects to the distribution server, it gets automatically all distributed objects (with property values) from server as well.

I also added the DistributeString type so you can send also strings across wire (because the System.String is a reference type, so it cannot participate in distribution process).

And at last but not least I have added a simple client-server chat application for learning purposes...

 

Hope this helps!

david