Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

fps fan

Network synchronization

Recommended Posts

Now I'm working with a multiplayer fps game,and Network synchronization is a big problem.I use unity network system rather than any network framework to make it.In the game,the synchronization information includes character transform,2 parameters for animator controller(blend tree parameter),and I set the sendrate at 60.But,when runing the game,the fps is only about 30(I run server in unity editor and a client at the same time),and the movement of the character seems to be really rigid.Would you please give me some suggestion?

Share this post


Link to post
Share on other sites

dont use a sendrate of 60 it will kill your network stats

10 - 20 is perfectly fine but make sure to .Lerp or .Slerp it.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Thanks!It's an extraordinary suggestion.For transform information,it's easy to apply lerp;but for animation,which is controlled by blend tree and I must synchronization the blend tree paramaters,how to lerp it?By the way,can you understand my Chinglish?

Share this post


Link to post
Share on other sites

instead of lerping, you can just use the animator.setfloat function, which has one that is smoothed too, look here:

Please login or register to see this link.

Share this post


Link to post
Share on other sites

We can synchronize transform by pull transform componnent into NetworkView,so transform is the default synchronization object,so I think Unity has already think about .Lerp it,right?I try to .Lerp it by myself but I fould it really difficult for me.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

I tried to just pull transform into NetworkView and finally I found it's better than my script!Unity must has .Lerp it.For the new UNET,see Please login or register to see this link.  ,the new engine component NetworkTransform is the best to handle transform synchronization.But now unity has not release it.

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

Yeah,recently I found maybe I should try some network framework such as ulink,photon,these framework optimize the network synchronization,so are you using photon or any other framework?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...