PDA

View Full Version : replication issues with > 1 client.



legacy-gw4043
07-07-2003, 01:52 AM
OK,

I've had some limited success replicating things between the server and 1 client. I'd now like to work on getting multiple clients to behave correctly. From what I've read, replication only works between the server and the client that owns the actor?

Here's a scenario:

server, client1, client2, client3.

Client1's actor is rotated 50 degrees and replicated to server. Server now has correct rotation of client1's actor. Where does that leave client2 and client3's version of that actor?

One would think when client1's actor rotates, it would update the server and then the server update all the other clients....from my experience, this definately isn't the case. I'm thinking I need to have another control block for (!bNetOwner && role != role_authorithy)....which would update all the 'other' clients.

Is this the wrong way to go about it? Any suggestions are greatly appreciated.

thanks.

legacy-Kaoh
07-07-2003, 07:16 AM
Personally I suggest you work the other way around, let the server rotate the actor so that he knows how it is and replicate to the clients.
If the client decides when to rotate (like in case of players etc) best way (i think) is to replicate the command to the server and let the server do the actual rotating.
Gives you also a more save way to bug fix when you want to see if things work correctly.

legacy-Vir@s
07-11-2003, 05:52 PM
Yeah I agree with Kaoh, since in general you can say that all other clients (except the actor owner) have the same as the server has ;)

Mfg, Vir@s

legacy-MeanFish
07-11-2003, 11:40 PM
I've been pondering network coding for unrealscript for the last couple hours (I'm a newb, don't throw things yet!) so I just want to clarify...

pretty much, let all of the calculating be done by the server, then broadcast replicated actors to clients... then wait for the next tick?

So with a custom gametype, I'd essentially run the custom gamerules listener (gamerules class instance) server-side, and then broadcast (mass-replicate) when the objectives for point scoring are fulfilled or a kill is registered or something to that effect?

or, for a client-triggered projectile, I'd pass it from client to server rather than spawning it and then let the server broadcast to everyone, which would spawn it client side to the same person?

Am I making sense or should I keep reading? lol :)