[Red5] realtime movement ; latency ; dead reckoning ; coordinate prediction
Walter Tak
walter at waltertak.com
Wed Nov 7 10:21:38 PST 2007
>> b. What would be the performance impact of using SO.send() at a decent
>> framerate (say 10 times a second) versus normal usage of SO + onSync.
> I'm not sure, but I have a potentially useless idea.
>
> If you do it this way (Disclaimer - not sure at all :)):
> * All clients do standard flash remoting to tell the server their action.
> * All clients register to the same shared object.
> * Server periodically tells the client where are everyone else are?
> * Server calculate whether they're stopped or off the screen etcs
> and update the shared object.
> Note: only server that is allowed to update, the rest just listen.
This is an interesting point of view. Thinking about it ; we could use a SO
for a single player as well ; as long as the server reeds the SO of the
specific client and processes that data. In short:
1. all clients connect to their own private shared object on the server (eg
named "player1"
2. all clients connect to one public shared object on the server (called
"positions")
3. server updates the public SO at a regular interval (e.g. 10 fps) and
calculate dx,dy,velocity,vectors etc (whatever is needed) based on the other
private SO's of all players
This way no extra data is sent from client to server and from server to all
clients.
However I'm a bit reluctant to use heavy server-sided processing ; image a
gameroom with 16 clients and having say 100 gamerooms ; that would result in
calculations for 1600 clients per 1/10th of a sec = 16.000 calculations per
second. I think compiled java can be quick, but that quick ?
So , if possible , I'd like to distribute the processing of coordinates on
the client which has almost the same processing power as the server and can
easily use 10% of their cpu-processing for dead reckoning. But then again ;
Regards,
Walter
--
I am using the free version of SPAMfighter for private users.
It has removed 13728 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len
More information about the Red5
mailing list