Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    GuacFrog
    No problem, glad it's working out a bit.

    Physics can be enabled on both systems, Smooth Sync will just set the Velocity to 0 on 'non-position setting systems' and when trying to push things around physically, it's not going to work right if one system is trying to push an object who's position is determined by another system. Even if that functionality were to be turned off though, it wouldn't help because it still tries to set the position every frame.

    Basically my understanding of the whole situation is, the reason it doesn't work is that in order to push the cube (position determined by server), your player (position determined by a client) would have to try to move into a position the cube is, but the player can't because the cube is being set to the server position every frame. So the version of your client player on the server (position determined client) needs to physically bump into the cube but it can't.

    Leave a comment:


  • replied
    Originally posted by fuestrine View Post
    GuacFrog
    Because the physics have to happen on the same system that determines the box position. In a game like Rocket League, the server determines the position of everything (with client prediction though so it seems like it's not). If you hit it on the client, it's not really hitting it on the server. Your client player would have to try to go into a position that it can't because the box is there in order for it to hit on the server. I thought I made it clear that you wouldn't be able to physics when two separate systems are trying to physics together. If you think not though, I'd be happy to offer a refund.

    Sending an RPC to the server to move the box when you hit it on the client may work, but it depends on what you are trying to do for your game.
    I do not want a refund. The plugin works well when applied to my player character (keeps him from jerking around). I think I will use this on my player and try to create a client prediction system for the physics actors in my game.

    I apologize for the misunderstandings. I am quite new to replication. A quick note, you mention how you made it clear that physics can't be enabled on both system, but I never had physics enabled on the client, only the server. And for some reason, the player has trouble pushing around a cube when the smooth sync is applied to him.

    Thanks for the help, I appreciate it.
    Last edited by GuacFrog; 09-21-2019, 06:48 PM.

    Leave a comment:


  • replied
    GuacFrog
    Because the physics have to happen on the same system that determines the box position. In a game like Rocket League, the server determines the position of everything (with client prediction though so it seems like it's not). If you hit it on the client, it's not really hitting it on the server. Your client player would have to try to go into a position that it can't because the box is there in order for it to hit on the server. I thought I made it clear that you wouldn't be able to physics when two separate systems are trying to physics together. If you think not though, I'd be happy to offer a refund.

    Sending an RPC to the server to move the box when you hit it on the client may work, but it depends on what you are trying to do for your game.

    Leave a comment:


  • replied
    Originally posted by fuestrine View Post
    GuacFrog
    Is it better or worse when Smooth Sync is on the player? One other thing is to raise your TimeCorrectionSpeed, but it'll start getting jittery at a certain point. You could try lowering the InterpolationBackTime and raising the Position Easing Speeds more too. It's never going to be that great when doing physics if one system is determining the position and then physicsing into an object with a position determined by another system.

    It looks like you are going inside of the box a lot. Maybe mess around with Unreal collision stuff so it does that less. You can also try sending an RPC over and moving the box on the server when you hit it on your client.
    When putting smooth sync on the player, it keeps him from being able to push the box on the client. He can only barely nudge it. Not sure why this is.

    Leave a comment:


  • replied
    GuacFrog
    Is it better or worse when Smooth Sync is on the player? One other thing is to raise your TimeCorrectionSpeed, but it'll start getting jittery at a certain point. You could try lowering the InterpolationBackTime and raising the Position Easing Speeds more too. It's never going to be that great when doing physics if one system is determining the position and then physicsing into an object with a position determined by another system.

    It looks like you are going inside of the box a lot. Maybe mess around with Unreal collision stuff so it does that less. You can also try sending an RPC over and moving the box on the server when you hit it on your client.

    Leave a comment:


  • replied
    Originally posted by fuestrine View Post
    GuacFrog


    I'm not really sure how Unreal does it specifically with networked objects if you are asking about that. Smooth Sync itself will set the velocity to zero every frame so it doesn't interfere with Smooth Sync though.
    Okay, here is a better example.

    The following test was done with 150ms ping and 12 packet variance. The server is on the left and client on the right (ping is simulated).

    https://youtu.be/0Ba2lMLwP8s

    Interpolation back time is 0.025, position/rotation lerp speed is 0.9, and send rate is 60. The player is NOT using smooth sync. Only the cube.
    My basic goal is to get the player pushing the box without the major glitches. I'm okay with a few artifacts, but this is unplayable. Let me know what you think.

    Leave a comment:


  • replied
    GuacFrog

    1) Do I have to explicitly disable client physics simulations on the actor after checking simulate physics? 2) Are there any other steps I should know about when doing this?
    I'm not really sure how Unreal does it specifically with networked objects if you are asking about that. Smooth Sync itself will set the velocity to zero every frame so it doesn't interfere with Smooth Sync though.
    Last edited by fuestrine; 09-20-2019, 11:19 PM.

    Leave a comment:


  • replied
    Interesting. I'm going to do some more tests and get back to you. A couple of questions regarding replicating physics simulations from server to client. 1) Do I have to explicitly disable client physics simulations on the actor after checking simulate physics? 2) Are there any other steps I should know about when doing this?

    Regarding the second video, I believe that this is an Unreal problem and I am close to solving it.

    Leave a comment:


  • replied
    GuacFrog


    if the data being transmitted is compressed, I think this plugin should work for what I want to do
    Keep in mind that compression will only work up to a certain number before it starts becoming inaccurate. I want to say it's around 63,000 for half floats, which we use.

    If this plugin is not transmitting data for every object UNLESS the object has moved, then it should work with thousands of objects so long as only a few of them move at once, right?
    Maybe, but I'm not sure on Unreal's limitations in just the general amount of objects that can be networked even when not moving. I know with the success of Fortnite they have been making huge strides in networking so it may work fine, but it may not.

    if the client were to push a cube that is simulated on the server, that client player would lag into the cube because of the delay, correct? And the fix would be client prediction?
    Correct, it would not physics well and the fix would be client prediction.
    You can try turning down the Smooth Sync InterpolationBackTime and raising the Smooth Sync LerpingSpeed variables though to get more reactivity. It should then be better in this regard but still not that great.
    One other option may be to send an RPC to push it on the server when it collides on the local client, but I'm not sure of your game's needs.

    In other words, this plugin is good for smoothing actors so long as the player doesn't directly interact with those actors (ie pushing them)? For instance, a ball falling down a mountain would be smoothed well. However, a soccer ball that is being physics simulated on the server being pushed around by the client would not smooth properly with high ping.
    Correct. You may be able to send an RPC to move objects which would work for some games, but it wouldn't react in real time locally like a game like Rocket League would. The rubber banding you see in a game like Rocket League is the result of the client becoming off from what the server thinks it should be so the client gets corrected.

    Yes the first video is what I would expect from trying to physics collide with an object owned by one system and the other object owned by another system. Try lowering InterpolationBackTime and raising the LerpingSpeed variables though and it may act a bit better, but still not that great depending on what you need the box interaction for in your game.

    The second video is pretty crazy though and not what I would expect from Smooth Sync, lol.
    Is the box and the player both using Smooth Sync?
    Would I be able to recreate this issue by using the ThirdPersonTemplate and adding a box to push around? Let me know if there's anything else you did besides that to recreate the issue.

    Let me know if I didn't respond to anything or if you want more explanation on anything. Get back to me about that second video for sure and I'll see what's going wrong with Smooth Sync.
    Last edited by fuestrine; 09-20-2019, 07:33 PM.

    Leave a comment:


  • replied
    Here is another issue that might have to do with the problem. It seems like the original collision is getting left behind. https://youtu.be/br7RYgcPy0s

    Leave a comment:


  • replied
    I made a quick video demonstrating. https://www.youtube.com/watch?v=PTttNknyn8s

    Leave a comment:


  • replied
    In other words, this plugin is good for smoothing actors so long as the player doesn't directly interact with those actors (ie pushing them)? For instance, a ball falling down a mountain would be smoothed well. However, a soccer ball that is being physics simulated on the server being pushed around by the client would not smooth properly with high ping.

    Leave a comment:


  • replied
    I think maybe I understand what you meant by client prediction. For example, with this plugin, if the client were to push a cube that is simulated on the server, that client player would lag into the cube because of the delay, correct? And the fix would be client prediction?

    Leave a comment:


  • replied
    Originally posted by fuestrine View Post
    GuacFrog
    No problem at all, feel free to ask questions any time.

    Smooth Sync won't send any information across the network if actors are not moving, but I'm honestly not sure how it'll fair. I've been meaning to try to figure out the limits for my Plugin anyway so I'll take a look at it sometime this week and get back to you.
    Upon further research, if the data being transmitted is compressed, I think this plugin should work for what I want to do. If this plugin is not transmitting data for every object UNLESS the object has moved, then it should work with thousands of objects so long as only a few of them move at once, right?

    I'm going to purchase the plugin and give it a shot. I'l let you know how it goes.

    Leave a comment:


  • replied
    GuacFrog
    No problem at all, feel free to ask questions any time.

    Smooth Sync won't send any information across the network if actors are not moving, but I'm honestly not sure how it'll fair. I've been meaning to try to figure out the limits for my Plugin anyway so I'll take a look at it sometime this week and get back to you.

    Leave a comment:

Working...
X