Micro stutter fix for Unity/Empyrion

Discussion in 'General Discussion' started by ShmoeSOLID, Aug 27, 2016.

  1. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    Hello,

    I made the video below with the Unity engine to show the developers exactly what I'm referring to about the micro stutter in the game. If anyone has noticed, especially with higher hz monitors, there is a small micro stutter in the player's movement, but goes away when you stop moving. This has to do with the fixed timestep being too high in the engine, it has nothing to do with performance.

    The fixed timestep is the rate at which the physics and player's movement are updated. The default in Unity engine is 0.02. When lowering to 0.005 the problem disappears, but may not be a viable solution. I offer a workaround for the developers while leaving the timestep at default, if indeed lowering the timestep isn't possible for your game.

    If you guys give the user the ability to cap our frame rate at 50, the problem disappears. This is obviously not a permanent solution because who wants to play this gorgeous game at 50 fps? But this solution will at least give us the ability to stop the stutter and have smooth movement. I'll take 50 fps over stutter any day of the week.

    Please watch the video at 60fps to kinda see what I'm talking about. The stutter is much clearer in person with a 144hz monitor, but you should get the idea.

     
    #1
  2. Arturius1967

    Arturius1967 Captain

    Joined:
    Aug 9, 2015
    Messages:
    275
    Likes Received:
    680
    Thank you for the info, i forwarded it to the devs.
     
    #2
  3. piddlefoot

    piddlefoot Rear Admiral

    Joined:
    Mar 4, 2015
    Messages:
    1,841
    Likes Received:
    1,612
    Yea I linked it to.
     
    #3
  4. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    http://s3.amazonaws.com/picobots/assets/unity/jerky-motion/JerkyMotion.html

    There is a good example of the Unity problem. For me both of the "FixedUpdate" options (2 and 3) are jerky and 1 and 4 are perfect.

    In the same example from the video I posted, I moved the camera movement code out of the "FixedUpdate" method and into the "Update" method. I then used "transform.Translate" in conjunction with "Time.deltaTime" instead of the default "AddForce" and the result is silky smooth movement.

    For the life of me, I cannot understand why this has been such a persistent problem with the engine and why the developers of Unity have not addressed this yet. This is core movement functionality and should be addressed much sooner than later.
     
    #4
  5. H.P. Strangelove

    H.P. Strangelove Captain

    Joined:
    Jun 27, 2015
    Messages:
    55
    Likes Received:
    278
    Would really like to know if the developers can address this. This micro stutter seems to plague so many Unity-based games.
     
    #5
  6. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    From "James" via Eleon support email:

    "I understand exactly what you were saying, and this IS a graphics and render optimization which will occur in a future update, it is also related to the syncing factor in multiplayer scenarios as both single and multiplayer currently share the same files it is just a changed state to the way the files are processed which is different, changing the setting now will not fix this stutter as there are other factors involved as I said. It will get a fix, we know what causes it, but right now it is on a list and alot of other much more important bugs and features need to be implemented first before we can apply the full fix for this, otherwise fixing it now will only hold for a week or two before one of the other implemented features effects it again.

    As I said, game breaking bugs and the final back bones structure of the game WILL be implmented first before we fix this, it will be fixed though.
    James."

    I could make the argument that this is a core movement issue and NOT a graphics and render optimization, but I'll leave it at that.

    For now you can use a application like ASUS GPU Tweak to limit your frame rate to 50 and semi solve the problem.
     
    #6
    Lyceq and Flermpick like this.
  7. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    To each his own. :cool: On my system though, that "slight blurring" is horrendous and looks like I'm running at 15 fps even though I'm at 70+. So simply a temp solution for those who can't stand it like me. :D
     
    #7
  8. Frigidman

    Frigidman Rear Admiral

    Joined:
    Mar 19, 2016
    Messages:
    2,280
    Likes Received:
    3,715
    Odd indeed though. It certainly is a sidestepping around thing that is the most noticed.

    Sometimes the game just bogs down and a reload (exit to menu, load save/rejoin server) clears it up... which seems more of something building up to the point it drags itself down. Prolly unrelated to tick speed. I do know light sources kill frame rates, and the lower my FPS gets, the more I see this jigger you describe. Most the recent patches have caused my fps to get higher and higher and so it kind of works itself out when letting it run to 144fps. But darn those lights on buildings !!! lol.
     
    #8
  9. piddlefoot

    piddlefoot Rear Admiral

    Joined:
    Mar 4, 2015
    Messages:
    1,841
    Likes Received:
    1,612
    You have your CPU clocked to 4.5 ghtz, very few people can do that to get to the frame rate you get, and to be really honest there isnt anything wrong with 50 FPS it is not choppy at 50 unless you have a graphics issue, something is not synced with something else, hardware wise.

    I been hassling Eleon for months over the stutter, done videos and everything, but if its a matter of features ending to fix it I say keep adding features.
     
    #9
  10. Frigidman

    Frigidman Rear Admiral

    Joined:
    Mar 19, 2016
    Messages:
    2,280
    Likes Received:
    3,715
    I'm a spoiled rotten old man, and anything lower than 70 fps really bugs my eyes out. Unless its pre-recorded video... then 30 fps actually is fine (go figure).

    :)

    Although, some games do implement a slight motion blur at lower fps, which does smoothen the nastiness of lower fps.
     
    #10
    piddlefoot likes this.
  11. Pino

    Pino Lieutenant

    Joined:
    Sep 18, 2015
    Messages:
    11
    Likes Received:
    10
    I thought it was my video card, but I noticed recently that I don't have that stutter while flying. For example, using the drone on planet. Last playthough, when I was in my CV in orbit, I was flying around with jetpack to not have that stutter, because if I deactivated jetpack (with gravity generator of course) I had that again (and in space I manage to have 60 fps stable).
     
    #11
  12. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    I did ask "James" to see about implementing a FPS lock toggle in the options as a temporary fix for those who want to reduce the stutter (and are unable or can't figure out how to obtain third party software to do it) since it wouldn't take but a few minutes out of development time to add it. I received a response from "James" and "Christoph" both stating they would forward the suggestion to the devs. So we'll see if it gets added.
     
    #12
    Frigidman likes this.
  13. Frigidman

    Frigidman Rear Admiral

    Joined:
    Mar 19, 2016
    Messages:
    2,280
    Likes Received:
    3,715
    I think its a good idea for ANY modern game to have the FPS limiter. There are some games where my GPU races so bad because it has none, and the game is not tasking enough to slow it down normally.

    Even in EGS, the main menu wants to go 9999 fps ... ouchies.

    So long as the limiter has the main sets: 30, 60, 90, 110, unlimited.
     
    #13
  14. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    50 definitely needs to be one of the set options, its the only one I found that semi fixes the movement stutter.
     
    #14
  15. Frigidman

    Frigidman Rear Admiral

    Joined:
    Mar 19, 2016
    Messages:
    2,280
    Likes Received:
    3,715
    Thats such an odd number though. Maybe the Unity developers end up fixing the fundamental issue though ... that would be the best thing really. It's just Unity, right? I don't see the issue in other engines.
     
    #15
  16. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    Yeah just Unity because of their FixedUpdate method, which is for physics. Everything updates at the same time every time regardless of how fast a computer is. The problem lies when a player's movement code is placed in FixedUpdate, you run into the issue at hand.
     
    #16
  17. Frigidman

    Frigidman Rear Admiral

    Joined:
    Mar 19, 2016
    Messages:
    2,280
    Likes Received:
    3,715
    Ah.

    There are other games I have played which go 'wacky' with its physics because my monitor allows the frame rate higher. I usually had to reduce/cap those games down to 74ish to get their physics to start behaving. Skyrim, Oblivion, Fallouts... hell, all the bethesda crap I guess suffer from the same physics and frame rate bugs. I thank Eleon for NOT using the bethesda engines ;)
     
    #17
    Kassonnade likes this.
  18. ShmoeSOLID

    ShmoeSOLID Lieutenant

    Joined:
    Apr 17, 2016
    Messages:
    8
    Likes Received:
    14
    The more permanent fix would be to interp the player movement while still utilizing FixedUpdate at the default rate. You still keep the sync, but makes it smooth as glass. It's something they should have done from the beginning.
     
    #18
  19. piddlefoot

    piddlefoot Rear Admiral

    Joined:
    Mar 4, 2015
    Messages:
    1,841
    Likes Received:
    1,612
    Maybe they did and theres some other issue were not seeing ?

    Doesnt make sense they would not fix it if it was such a simple thing, they did set the frame rate lock at 50 on the experimental branch, but they then lifted it back to 60 a week later , there must be reasons for this that are more complicated than whats in this thread, and because most of us cant program or code, them explaining the intricate details of there game engine and source on a forum, I cant see it happening, not to mention what other games like SE might take from it to use.
     
    #19
    Kassonnade and Frigidman like this.
  20. Frigidman

    Frigidman Rear Admiral

    Joined:
    Mar 19, 2016
    Messages:
    2,280
    Likes Received:
    3,715
    Just bumping this topic, because lately I have been seeing more of this jitter occur. And it seems to be off and on between game starts. Sometimes its ok, sometimes not.

    Sometimes I set the in-game fps limit to 50, and it goes away, sometimes its like the game ignores the 50 fps setting. Sometimes I use an external app to limit fps, and it goes away.

    Then at other times, I'm at 90fps locked and its smooth, no jitter.

    I dont understand! Why is it not consistent in the same game, same area, same ships all I'm working on lol. Its become a gamble on game load if its going to run smooth or wacky.
     
    #20
    Flermpick and Siege Inc. like this.

Share This Page