On Tuesday 18 December 2007 21:42:13 Jan Ciger wrote:
> Souvarine wrote:
> > Lunpa, The wrote:
> >> Also, I would highly recommend against calculating any game physics
> >> clientside in such a scenario.
> > think I would compute as many things as possible on client side to
> > avoid consuming too much CPU on the server.
> > Souvarine.
> You would have a very hard time synchronizing the physics consistently

that is never too easy, i guess,
at least in complex cases.

> across all affected clients. Imagine an area spell blowing pieces around
> that could injure characters or monsters. If calculated on client, every
> client will get a slightly different version of the situation. In the
> extreme case some characters could be dead on one client but not on
> another seeing the same scene.

there are many ways to go about it.

one thing is that you can calculate things in many places,
even the same things sometimes - perhaps useful exactly for such 
high precision physics.

for a (pseudo)random effects / events / .. movement,
it is possible to share the code and the random seed,
to get (exactly) the same results from the calculations
in e.g. every client and the server.

certainly physics is and can often well be done in the server only.
in some cases the server has to do it anyway:
one example of that is when you can't / don't want to 
trust the clients for everything. and often the collisions are just
lightweight enough bounding box intersection 
or basic ray pickings anyway i guess.

however, even if/when checks are done on the server,
it may be necessary for the clients to calculate too,
to e.g. be able to show effects like that explosion you mentioned
detailed and quickly enough. of course often this can be just
a visual effect, and not a physics calculation, and then it is not crucial for 
them to have the same random seed and generator etc. but if it is desired
for other reasons, it is possible to both use it for e.g. doing the damage 
too, e.g. by sharing the seed and code.

then again, in one arcade style / action game we are making,
currently the trusted client (or peer) that has the control of a weapon 
anyway, is also responsible for calculating the damages it does and
reporting them over the network to the server.

>
>
> Regards,
>
> Jan
>
> _______________________________________________
> Soya-user mailing list
> Soya-user@gna.org
> https://mail.gna.org/listinfo/soya-user



_______________________________________________
Soya-user mailing list
Soya-user@gna.org
https://mail.gna.org/listinfo/soya-user

Reply via email to