Jump to content

  • Log In with Google      Sign In   
  • Create Account

Best way to display player position/rotation when updates arrive at varying intervals


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 fjholmstrom   Members   -  Reputation: 172

Like
0Likes
Like

Posted 26 December 2012 - 01:44 PM

I've implemented large parts (~90% of the functionality) of the networking techniques described in the now famous paper "The TRIBES Engine Networking Model" (http://www.pingz.com/wordpress/wp-content/uploads/2009/11/tribes_networking_model.pdf) in my C# networking library.

All in all I have to say that I'm incredibly pleased with the flexibility and performance that this networking scheme offers, but I've run into a bit of a problem. Since one of the features of the way the tribes model works is that the not all objects are updated every time, but rather a prioritization scheme picks which object updates should be written to each packet. What this means in practice is that position/rotation/velocity updates for your networked objects will not be received at a constant pace.

This creates a bit of a problem with displaying objects that move nice and smooth on screen, now even though I am no expert at this subject, the three main ideas behind rendering remote objects on screen are these:
  • Interpolation/"Valve"-style, where you hold back on rendering for update_rate * 2, basically introducing some artificial lag but always (except in case of a lot of packet drop) rendering nice smooth movement on screen.
  • Interpolation and then Extrapolate, basically interpolate from current to next known position as it comes in, and then extrapolate based on velocity from last known position until a new packet comes in, there are a few ways to go about this (linear, cubic splines, etc.).
And, in all honesty - I'm just not sure which model fits best for the type of "Most Recent State Data" model that the tribes networking paper describes. Using interpolation/valve could work, but it could lead to pretty large "delays". And using interpolation/extrapolation, while usable would probably lead to a lot of visible corrections, etc.

Any help on reasoning about this would be most appreciated :)

Edited by fjholmstrom, 26 December 2012 - 02:11 PM.


Sponsor:

#2 hplus0603   Moderators   -  Reputation: 5363

Like
0Likes
Like

Posted 26 December 2012 - 06:05 PM

Both can be used. Pick one, based on what you think works best for your game. If that ends up not working well in practice, try the other.

 

Btw: I think Tribes itself used the interpolate-then-extrapolate mechanism, similar to the EPIC network interpolation library.


Edited by hplus0603, 26 December 2012 - 06:05 PM.

enum Bool { True, False, FileNotFound };




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS