Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

over the net player animation (Real Studio games Mailinglist archive)

Back to the thread list
Next thread: Passing null to a declare


[ANN] Preview of RBD 2.4   -   Marc Zeedar
  over the net player animation   -   LMSpam neuropop.com
   Re: over the net player animation   -   LMSpam neuropop.com
   Re: over the net player animation   -   Joseph J. Strout
   Re: over the net player animation   -   Joseph J. Strout

over the net player animation
Date: 31.01.05 17:31 (Mon, 31 Jan 2005 11:31:57 -0500)
From: LMSpam neuropop.com
Currently, my client apps report location and orientation to the
central server once per second (if they're moving - nothing is reported
if they're just sitting still).

The server immediately broadcasts this info to other connected players.
Each player then takes this new info and (over a 2 second period) does
a linear interpolation from the currently held location/orientation of
each player to the newly received location/orientation.

This sorta works - but the movement of other players is neurotic
looking. At the beginning of a move they change quickly, and then
gradually slow until the next movement is picked up - where the whole
thing starts over.

What's normally done for creating smooth animation of remote players'
locations/orientations?

L

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: over the net player animation
Date: 31.01.05 18:01 (Mon, 31 Jan 2005 12:01:46 -0500)
From: LMSpam neuropop.com
Cool - will try that. My only concern with upping the report rate is
overloading my poor server - it's handling the web server, database
search functions, streaming audio for artists, AND it's only on a DSL
connection.

I'm using Renegades as the basis, so is it safe to assume velocity will
be whatever is set in the config file for forward or backward velocity?
And rotational velocity is "mCamYawV" in the "ApplyGameControls"
method?

I have a copy of NetMaze, didn't use the code, but definitely copped
your style for my server. Thanks!

L

On Jan 31, 2005, at 12:41 PM, Joseph J. Strout wrote:

> At 11:31 AM -0500 1/31/05, <email address removed> wrote:
>
>> Currently, my client apps report location and orientation to the
>> central server once per second (if they're moving - nothing is
>> reported if they're just sitting still).
>>
>> The server immediately broadcasts this info to other connected
>> players. Each player then takes this new info and (over a 2 second
>> period) does a linear interpolation from the currently held
>> location/orientation of each player to the newly received
>> location/orientation.
>
> That sounds like a reasonable approach, but 1 update per second is way
> too slow.
>
> Also, if I understand you correctly, you'll always have the avatar's
> apparent position lagging 2 seconds behind their true position. I
> would suggest a refinement:
>
> 1. The server should report not just the position and orientation of
> each player, but the velocity and rotational velocity as well.
>
> 2. Using this info, each client should compute where the avatar is
> going to be at some point a short distance in the future -- say, 0.5
> seconds.
>
> 3. Interpolate between the current position/orientation and prediction
> position/orientation over that same period (0.5 seconds).
>
> Notice that, as long as the predictions are correct, that you're now
> not lagging behind the true position/orientation at all. But to make
> this work well you're still going to have to send frequent updates, I
> would say at least 10 times per second (or whenever an objects
> velocity or rotational velocity changes).
>
>> What's normally done for creating smooth animation of remote players'
>> locations/orientations?
>
> Did I send you that Net Maze demo I was working on a while back? I
> really need to clean that thing up and publish it somewhere...
>
> Best,
> - Joe
>
> --
> REAL World 2005 - The REALbasic User Conference
> March 23-25, 2005, Austin, Texas
> <http://www.realsoftware.com/realworld>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: over the net player animation
Date: 31.01.05 18:41 (Mon, 31 Jan 2005 11:41:45 -0600)
From: Joseph J. Strout
At 11:31 AM -0500 1/31/05, <email address removed> wrote:

>Currently, my client apps report location and orientation to the
>central server once per second (if they're moving - nothing is
>reported if they're just sitting still).
>
>The server immediately broadcasts this info to other connected
>players. Each player then takes this new info and (over a 2 second
>period) does a linear interpolation from the currently held
>location/orientation of each player to the newly received
>location/orientation.

That sounds like a reasonable approach, but 1 update per second is
way too slow.

Also, if I understand you correctly, you'll always have the avatar's
apparent position lagging 2 seconds behind their true position. I
would suggest a refinement:

1. The server should report not just the position and orientation of
each player, but the velocity and rotational velocity as well.

2. Using this info, each client should compute where the avatar is
going to be at some point a short distance in the future -- say, 0.5
seconds.

3. Interpolate between the current position/orientation and
prediction position/orientation over that same period (0.5 seconds).

Notice that, as long as the predictions are correct, that you're now
not lagging behind the true position/orientation at all. But to make
this work well you're still going to have to send frequent updates, I
would say at least 10 times per second (or whenever an objects
velocity or rotational velocity changes).

>What's normally done for creating smooth animation of remote
>players' locations/orientations?

Did I send you that Net Maze demo I was working on a while back? I
really need to clean that thing up and publish it somewhere...

Best,
- Joe

Re: over the net player animation
Date: 31.01.05 20:12 (Mon, 31 Jan 2005 13:12:58 -0600)
From: Joseph J. Strout
At 12:01 PM -0500 1/31/05, <email address removed> wrote:

>Cool - will try that. My only concern with upping the report rate is
>overloading my poor server - it's handling the web server, database
>search functions, streaming audio for artists, AND it's only on a
>DSL connection.

Yes, that could be a problem. Most likely WILL be a problem. But
with the improved algorithm, I think you'll be able to get by with
fewer updates.

>I'm using Renegades as the basis, so is it safe to assume velocity
>will be whatever is set in the config file for forward or backward
>velocity?

No, the config file really only sets the speed, not the velocity.
Velocity is both speed and direction. You can get that from GameObj,
I believe.

> And rotational velocity is "mCamYawV" in the "ApplyGameControls" method?

Yes.

Best,
- Joe