Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

    #31
    UE4 is not deterministic.. vehicle yes, but rigid bodies are. There are threads mentioning about this..
    I myself have experienced this and have to do my own c++ code for this deterministic thing..
    Your code is fine except for anti-cheating because server may no longer be the authority



    Comment


      #32
      Syed
      Ah, yes, you are correct. Unreal's Replicate Movement seems to track all movement from the server and transmits it to all clients but it seems to stop caring once the actor stops moving on the server. Then you can hit it on clients and it will get off, but once it starts moving on the server again, it syncs back up. It is weird that Unreal does it like this. Thanks a ton for the info, I'll have to add something to my store page. I didn't realize Unreal was lacking in this manner.

      In Smooth Sync, I keep the object at the same position until the owned Actor starts moving again so it will be deterministic.

      Yeah, owned by clients isn't the best anti-cheating but you should be able to validate a lot of things (like position) server side before sending out to other clients. I wouldn't recommend it for a super serious competitive FPS but even games like The Division use client determined position if I remember correctly. Plus it's not like it's impossible to cheat with server owned anyway. Definitely plenty of cheaters in CounterStrike back when I used to play.

      Thanks again for the new information!
      Last edited by fuestrine; 08-09-2018, 02:43 PM.
      Sync your transforms Smoothly across the network.

      Comment


        #33
        Alright, I understand how it's intended to work now. Might be worth clarifying on MP page.

        Unfortunately this isn't any kind of solution to replicates movement. A solution to replicates movement would be the exact same, except with client-side prediction and interpolated corrections. This is feasible but difficult without RPCs.

        What you're trying to do is an entirely different system.

        Furthermore, it's not a solution for it's actual intended purpose in any remotely competitive or persistent environment because it is prone to cheating.
        Last edited by Vaei; 08-14-2018, 06:15 PM.

        Comment


          #34
          Vaei
          You do not need to use the client owned functionality, it is just there if you want it. You can still have the server be the owner and there will be no RPCs from client->server.

          Can you explain what you would like clarified on the store page? I'm currently at my character limit on there, I wish they would provide more space. I don't think I'm misleading in any of what I write but I would be happy to take a look at any specific instances you point out.

          I don't make a claim to have client side prediction. I make the opposite claim on the store page of you won't need client side prediction by using Smooth Sync (from using client owned objects, which I also state as the plugin's key purpose on the store page).

          There's really no accurate correction as to the mistakes this plugin makes, only praise, which implies a lack of understanding.
          You told me a lot of information at once. I corrected and responded to everything up until the point where you said my plugin wasn't working. Then you never responded to my inquiry to replicate the issue. Did the problem end up being that you weren't setting up your actor correctly?
          I'd be happy to also respond to the other information you provided, but I just wanted to make sure I didn't have any major issues like my plugin not working at all first. It also becomes difficult to talk about multiple things at once.

          I'm definitely thankful for the Unreal knowledge because while I may have years of experience in multiplayer networking, I'm pretty new to Unreal.
          Last edited by fuestrine; 08-15-2018, 07:01 PM.
          Sync your transforms Smoothly across the network.

          Comment


            #35
            Originally posted by fuestrine View Post
            Vaei
            You do not need to use the client owned functionality, it is just there if you want it. You can still have the server be the owner and there will be no RPCs from client->server.
            The server does not own something that isn't also owned by the client, the server can be authoritative. Been over this. You're setting the owner to a local player controller on the server and it's not doing what you think it's doing. The server stores all player controllers and all that's doing is setting it to the first player controller it registered. I can't explain this any other way, the design and your belief surrounding it is simply incorrect.

            Originally posted by fuestrine View Post
            Can you explain what you would like clarified on the store page? I'm currently at my character limit on there, I wish they would provide more space. I don't think I'm misleading in any of what I write but I would be happy to take a look at any specific instances you point out.
            I think I was pretty clear. It doesn't do what Replicates Movement does, it's an entirely different system that solves none of the issues. Your plugin directly claims to be a replacement for it; it is not. That's straight up misleading.

            Originally posted by Marketplace Page
            Made to be a replacement for Unreal's Replicate Movement.
            Not remotely similar.

            Originally posted by fuestrine View Post
            I don't make a claim to have client side prediction. I make the opposite claim on the store page of you won't need client side prediction by using Smooth Sync (from using client owned objects, which I also state as the plugin's key purpose on the store page).
            No, but for your claim that it's a solution for replicates movement you WOULD have client-side prediction (and without RPCs, because, as I've said a million times it can't be owned and in that case you can't call RPCs).

            Originally posted by fuestrine View Post
            You told me a lot of information at once. I corrected and responded to everything up until the point where you said my plugin wasn't working. Then you never responded to my inquiry to replicate the issue. Did the problem end up being that you weren't setting up your actor correctly?
            I stopped responding because I was going in circles, repeating myself over and over. It felt like you'd rather not make the plugin do what it claims and you also don't want to update the description which is exceedingly misleading, I wasted a lot of time because I bought it on the basis that it is a solution to replicates movement. We've already made our own since which has proper non-RPC prediction and interpolation for corrections.

            Originally posted by fuestrine View Post
            I'd be happy to also respond to the other information you provided, but I just wanted to make sure I didn't have any major issues like my plugin not working at all first. It also becomes difficult to talk about multiple things at once.
            It works when you use it how it was designed and not how it says it is designed.
            Last edited by Vaei; 08-15-2018, 07:16 PM.

            Comment


              #36
              Vaei
              Sorry, when I say you can have "the server be the owner" of the actor I mean you can have a "server-owned actor" as described in the Unreal networking docs. https://docs.unrealengine.com/en-us/...ng/Actors/RPCs

              I think I was pretty clear. It doesn't do what Replicates Movement does, it's an entirely different system that solves none of the issues. Your plugin directly claims to be a replacement for it; it is not. That's straight up misleading.
              So the issue you wanted solved ended up being that you weren't setting up your networked actor correctly? Unreal's replicate movement also doesn't work with the way you were trying to set up your actor. There's no possible way to solve every incorrect actor setup unfortunately and I can't possibly add information like this to my store page since they don't allow a lot of characters.

              If your issue is the word "replacement" as meaning it will solve every possible non-advertised issue then I don't know what to say. I have used this word in advertising for over a year (in other products) and never had an issue where someone thought it would solve every possible non-advertised issue. You would definitely use it as a replacement by replacing using Replicates Movement with using Smooth Sync. I make no claims to have features that I do not have.

              as I've said a million times it can't be owned and in that case you can't call RPCs
              What is "it"? I'm having a hard time following when you don't specify some of your general words. Actors can be owned and they can call RPCs from client to server. https://docs.unrealengine.com/en-us/...ng/Actors/RPCs

              I'd be happy to test any specific scenario you describe where my plugin doesn't work that doesn't go against what I have on the marketplace page though.
              I've already tested you saying that it doesn't take distance relevancy into account. It does. I also tested and corrected your incorrect network actor setup. I'd be happy to continue looking for an error in my product though if you want to give me other specific scenarios where my product doesn't work.

              I thought it all worked out after you stopped responding to me showing you how to set up networked actors in the Unreal engine. I'd be happy to approve a refund though if it's possible through Unreal. I didn't realize you were so dissatisfied with the product. I think you have to start the process though? I seem to have no way as a publisher to do it from the link Unreal provides.

              EDIT: I believe this is the link to the refund page.
              Last edited by fuestrine; 08-17-2018, 10:19 PM.
              Sync your transforms Smoothly across the network.

              Comment


                #37
                The concept of a "server owned actor" does not exist - not in those docs and not in UE4. I have ELI5'd this over and over in as many ways as possible.

                I think you don't understand how Replicate Movement works. You're constantly saying certain setups wont work with Replicates Movement when they absolutely do. It's extremely basic and I don't know where your misunderstanding stems from:

                There is a struct in EngineTypes.h called FRepMovement that contains LinearVelocity, AngularVelocity, Location, Rotation, and a few other things. If bReplicatesMovement is true, the corresponding settings are compressed and packed into FRepMovement in the function AActor::GatherCurrentMovement() and then replicated to clients with an AActor::OnRep_ReplicatedMovement().

                Code:
                    /** Used for replication of our RootComponent's position and velocity */
                    UPROPERTY(EditDefaultsOnly, ReplicatedUsing=OnRep_ReplicatedMovement, Category=Replication, AdvancedDisplay)
                    struct FRepMovement ReplicatedMovement;
                When the ReplicatedMovement variable (struct) changes, it replicates it to all clients, who then apply the result.

                As such - any client can collide with an object that is replicating movement and the server will determine the result and propagate to all relevant clients.

                The problems with this is that there is no interpolation, so it snaps. It also doesn't use any form of client-side prediction for the player that touches an object which allows it to desync constantly.

                The overall problem then is that it gets corrected a lot, doesn't factor in player latency, and teleports when corrected. No one owns the object.

                Your plugin does not solve any of these issues. The store page is false - it's not a matter of elaborating, saying that it's a replacement for replicates movement is a lie - even if you want to believe otherwise, at this point, there's little justification. It doesn't have anything to do with it. I don't care about a $5 refund - using the plugin was a waste of time and it's misleading to other users, that's the real issue at hand.

                Comment


                  #38
                  The concept of a "server owned actor" does not exist - not in those docs and not in UE4.
                  It says "server-owned actor" in the Unreal networking docs where I linked. Here: https://docs.unrealengine.com/en-us/...ng/Actors/RPCs
                  Here is a screen shot of the section.

                  I understand how Replicates Movement works. Smooth Sync can also sync position determined by the server to the clients.

                  The problems with this is that there is no interpolation
                  Your plugin does not solve any of these issues.
                  My plugin does have interpolation.
                  Sync your transforms Smoothly across the network.

                  Comment


                    #39
                    Originally posted by Vaei View Post
                    The store page is false - it's not a matter of elaborating, saying that it's a replacement for replicates movement is a lie - even if you want to believe otherwise, at this point, there's little justification. It doesn't have anything to do with it. I don't care about a $5 refund - using the plugin was a waste of time and it's misleading to other users, that's the real issue at hand.
                    Have to agree here.

                    Comment


                      #40
                      Originally posted by fuestrine View Post
                      It says "server-owned actor" in the Unreal networking docs where I linked. Here: https://docs.unrealengine.com/en-us/...ng/Actors/RPCs
                      Here is a screen shot of the section.
                      That has no relevance to the context of your plugin and you're confused.

                      Every client and the server each bring up a world. And for each actor spawned on the server, a copy is spawned on each client. The actor spawned on the server is referred to as a "server owned actor" meaning that when the client calls an RPC on that identical actor it is called on that actor on the server.

                      You're setting the owner to server's player controller 0 believing that it somehow makes the server own it and it simply does not. Player controller 0 is the player controller of the first player who joined the game. The first player who joined the game owns the actor using your plugin's component. That is the player that gets synced. No one else does.

                      If you set ArbitraryActorX to own another actor on the server, that ACTOR owns the object, not the server. The actor needs an owning connection to call RPCs.

                      You can not make a solution for Replicates Movement that uses RPCs because objects that use replicates movement are not necessarily (and are rarely) owned. x10100

                      At the end of the day you are claiming your plugin does something that it does not, even after being told this.

                      Originally posted by fuestrine View Post
                      I understand how Replicates Movement works. Smooth Sync can also sync position determined by the server to the clients.

                      My plugin does have interpolation.
                      1. Doubt it
                      2 & 3 Irrelevant
                      Last edited by Vaei; 08-18-2018, 03:58 AM.

                      Comment


                        #41
                        Vaei
                        So you want it to sync from the server to clients when there is no owner? I can do that.
                        Sync your transforms Smoothly across the network.

                        Comment


                          #42
                          GrumpyNZ
                          Just saw your edit, hopefully you haven't been waiting long. I don't get any notifications when comments from a month ago are edited so it's best to just let me know here under a new comment.

                          I have fixed an issue with dedicated servers not being able to have the server control the transform. Thanks for bringing it to my attention. Let me know if you ran into a separate issue. I have already submitted a version to the Marketplace. I have also PMd you a copy if you don't want to wait.
                          Last edited by fuestrine; 08-19-2018, 02:34 PM.
                          Sync your transforms Smoothly across the network.

                          Comment


                            #43
                            GrumpyNZ
                            Alright, the new version is up on the Marketplace. Let me know if you have any other issues or questions.
                            Sync your transforms Smoothly across the network.

                            Comment


                              #44
                              New version has been submitted to the Marketplace.

                              1.06 Change Log:
                              Fixes for working with Pawn ownership.
                              Added function to enable or disable Smooth Sync. SmoothSyncEnable()
                              Exposed rest of public use functions to Blueprints.

                              Unreal approves things pretty fast so it'll probably show up in a business day or two.
                              Sync your transforms Smoothly across the network.

                              Comment


                                #45
                                Hi, I'm having an error compiling my project when Smooth Sync is enabled. The error goes away as soon as I disable the plugin and restart the editor. I've attached the error text below (with my user directory redacted).

                                Is this a bug in Smooth Sync? How can I resolve this?

                                Using UE 4.19.

                                Thanks!


                                Code:
                                Project.Package: ********** PACKAGE COMMAND STARTED **********
                                ExceptionUtils.PrintExceptionInfo: ==============================================================================
                                ExceptionUtils.PrintExceptionInfo: ERROR: System.Exception: Couldn't update resource
                                ExceptionUtils.PrintExceptionInfo:           at ModuleResourceUpdate.SetData(Int32 ResourceId, ResourceType Type, Byte[] Data)
                                ExceptionUtils.PrintExceptionInfo:           at ModuleResourceUpdate.SetIcons(Int32 ResourceId, GroupIconResource GroupIcon)
                                ExceptionUtils.PrintExceptionInfo:           at UnrealBuildTool.BaseWindowsDeploy.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, List`1 TargetConfigurations, List`1 ExecutablePaths, String EngineDirectory)
                                ExceptionUtils.PrintExceptionInfo:           at UnrealBuildTool.WindowsExports.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, List`1 InTargetConfigurations, List`1 InExecutablePaths, DirectoryReference EngineDirectory)
                                ExceptionUtils.PrintExceptionInfo:           at BaseWinPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
                                ExceptionUtils.PrintExceptionInfo:           at Project.Package(ProjectParams Params, Int32 WorkingCL)
                                ExceptionUtils.PrintExceptionInfo:           at BuildCookRun.DoBuildCookRun(ProjectParams Params)
                                ExceptionUtils.PrintExceptionInfo:           at BuildCookRun.ExecuteBuild()
                                ExceptionUtils.PrintExceptionInfo:           at AutomationTool.BuildCommand.Execute()
                                ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
                                ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Automation.Process(String[] Arguments)
                                ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Program.MainProc(Object Param)
                                ExceptionUtils.PrintExceptionInfo:           at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
                                ExceptionUtils.PrintExceptionInfo:           at AutomationTool.Program.Main()
                                ExceptionUtils.PrintExceptionInfo:        (see <REDACTED>Unreal Engine\AutomationTool\Logs\A+EpicLauncher+Epic+Games1+UE_4.19\UAT_Log.txt for full exception trace)
                                ExceptionUtils.PrintExceptionInfo: 
                                ExceptionUtils.PrintExceptionInfo: Exception: Couldn't update resource
                                ExceptionUtils.PrintExceptionInfo:    at ModuleResourceUpdate.SetData(Int32 ResourceId, ResourceType Type, Byte[] Data)
                                ExceptionUtils.PrintExceptionInfo:    at ModuleResourceUpdate.SetIcons(Int32 ResourceId, GroupIconResource GroupIcon)
                                ExceptionUtils.PrintExceptionInfo:    at UnrealBuildTool.BaseWindowsDeploy.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, List`1 TargetConfigurations, List`1 ExecutablePaths, String EngineDirectory)
                                ExceptionUtils.PrintExceptionInfo:    at UnrealBuildTool.WindowsExports.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, List`1 InTargetConfigurations, List`1 InExecutablePaths, DirectoryReference EngineDirectory)
                                ExceptionUtils.PrintExceptionInfo:    at BaseWinPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
                                ExceptionUtils.PrintExceptionInfo:    at Project.Package(ProjectParams Params, Int32 WorkingCL)
                                ExceptionUtils.PrintExceptionInfo:    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
                                ExceptionUtils.PrintExceptionInfo:    at BuildCookRun.ExecuteBuild()
                                ExceptionUtils.PrintExceptionInfo:    at AutomationTool.BuildCommand.Execute()
                                ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
                                ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Automation.Process(String[] Arguments)
                                ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Program.MainProc(Object Param)
                                ExceptionUtils.PrintExceptionInfo:    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
                                ExceptionUtils.PrintExceptionInfo:    at AutomationTool.Program.Main()
                                ExceptionUtils.PrintExceptionInfo: ==============================================================================
                                Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

                                Comment

                                Working...
                                X