Search Unity

How important is 16ms (or less)?

Discussion in 'General Discussion' started by G_Trex, Aug 4, 2020.

  1. G_Trex

    G_Trex

    Joined:
    Apr 20, 2013
    Posts:
    98
    Wasn't sure where to put this since it's not an issue, just a general question about game engines.

    We all know (or should know), that when it comes to game performance, we try to get everything running at 16ms or less. Even Unreal has the same rule.

    How stringent is this, and what are the consequences of going over?

    What will 16.5 ms do to the game?
    How about 17 or 18?
    What about something mad like 24 or 30?

    I know what the ms is and why it's important to keep it low, I've just never seen anyone discuss why that specific amount is significant or the consequences of exceeding it. I'm curious.
     
    Deleted User likes this.
  2. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    From what I understand, it's to help ensure 60fps / 60 game loops in a second.

    1000ms = 1 second, 16.6ms a loop * 60 loops = 0.996 seconds.
     
    Rewaken, G_Trex, angrypenguin and 3 others like this.
  3. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    In my personal experience, in-game under 20 frames per second (fps), you need to link the user inputs to the physics, so that the reactions are instant under the hood (also if the game drop 1fps). If the game is low in fps, then the player can sofer nausea, especially in the long run. For example, in my game, when the player (pilot) pulls back the joystick (makes a flare). At the airport is when fps drop more, so I try to give good feedback. For a First Person Shooter, Linus demonstrated that 240 fps(4ms) is better.
    A tv or monitor runs at 60Hertz equal to 60 fps (16.67 ms).

    (1/60fps)*1000=16.67 ms

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class FramesPerSecond : MonoBehaviour
    4. {
    5.  
    6.     [Header("INPUT")]
    7.     public float fps = 60f;
    8.     [Header("OUTPUT")]
    9.     public float ms;
    10.  
    11.     void Update()
    12.     {
    13.         ms = 1f / fps;
    14.         ms = ms * 1000f;
    15.     }
    16. }
    When in a first-person game you move the mouse side, rotating the camera, if the frame rate is lower than the monitor Hertz, you will see distortion line cut. So I presume that is one reason.
    Nausea: I experiment with nausea at 30fps (33ms) like IPadPro. The nausea feeling is delay far in time when increasing fps.
    But actually for long runs playing or VR 90Hertz (11ms) or 120Hertz(8ms) is much better.

    What will 16.5 ms do to the game?
    Is good for a game that runs on a monitor. Can be no good for a VR comfortable experience or competitive First Person Shooter.

    How about 17 or 18 ms?
    58fps is not a problem but there will be occasionally some distortion in the screen when updates: Screen Tearing.

    What about something mad like 24 or 30 ms?
    Mobile runs at 30fps. Most of the game with low budget GPU and very hi-performance demand at the game lunch runs at 40fps. But the user can experience nausea after several hours playing.

    I found this article: https://www.techspot.com/article/1668-how-many-fps-do-you-need/
     
    Last edited: Aug 4, 2020
    G_Trex and Deleted User like this.
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,187
    This. 6.94ms is 144 FPS. 16.67ms is 60 FPS. 33.34ms is 30 FPS. A low frame rate is fine on console hardware because it's been the norm long enough that people have accepted it, but it's expected your game will hit 60 FPS on the PC and many hardcore players expect try their best to achieve 144 FPS or greater. There are monitors that can handle 300 now.
     
    Rewaken and G_Trex like this.
  5. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    As mentioned above it's about the framerate.

    1 frame / (0.0165 second) = 60 fps.

    Your monitor has a default rate at which it refreshes the screen (typically 60 Hz). If you send "too few" frames, it has to wait an extra 16.6 ms to display the frame, which may have arrived 5 ms in. Or it will change the frame in the middle of a screen refresh, which produces screen-tearing.
     
  6. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    60 fps is a common monitor refresh rate because it is comfortable to view for most people. Anything less and it starts to look choppy, but it varies from person to person how irritating it is. It also depends hugely on the type of game and how fast-paced and competitive it is. Lower frame-rates will cause the game to feel laggy and competitive players are very precise and get frustrated when the controls feel anything less than instantaneous. People who are good at online shooter games generally demand the 60 fps+, but for a point-and-click adventure game it wouldn't matter so much.

    There have been some big-studio action/adventure games which were released capped at 30 fps on console. Most people were fine with this, but you always hear from a few angry people who refuse to buy these. This is just the first example I happened to find googling. Notice the comments:
    https://www.playstationlifestyle.ne...frame-rate-capped-at-30fps-epic-explains-why/

    Also, If you can't achieve consistent frame rate, that will be even more irritating than a lower frame rate.
     
    G_Trex likes this.
  7. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    As said 16.66ms relates to 60FPS. It could be you have a game without fast motion and be fine with 33.33 for 30FPS, or a really fast games that need a much higher frame rate. And there is Apple ProMotion for 120FPS at 8.33ms on some of their devices.

    And as has been written while I wrote this (delayed by Skype chat with publisher), consistency is important.
     
    G_Trex likes this.
  8. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    just want to point out that 30 fps on console is actually the rule rather than the exception. This has started to change recently with the introduction of higher power consoles (PS4 Pro and X1X) and the introduction of "performance modes," but usually the experience is 30 fps.
     
    G_Trex, angrypenguin and Joe-Censored like this.
  9. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    I don't really notice either way because I'm really bad at video games. :D
     
    EternalAmbiguity likes this.
  10. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Well, the main effect which hasn't yet been mentioned is that with a longer frametime (33.3 instead of 16.67) you have more "room" for better graphics or more intensive CPU calculations.

    It's a balancing act between performance and presentation.
     
    G_Trex, angrypenguin and aer0ace like this.
  11. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Somebody better contact the MPAA because their movies have been running at 24 FPS for decades. Aside from the Hobbit series that ran at double that, and made a lot of moviegoers nauseous.

    But I get it... Games are interactive, and the screen refresh had better be quick enough for me to react to it. Quick google search for quickest human reaction time results in 0.15 seconds, with the average at around 0.2 seconds.

    I can never really understand people who absolutely require something greater than 30 fps. Sure, you can "tell" the difference between 30 and 60, but I never felt that it was enough to decide whether I would play the game or not.
     
    G_Trex and angrypenguin like this.
  12. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,638
    Actually, 24 frames a second is noticeably jarring and this was noticed in the very early days of film production. Traditional films are projected with a shutter flickering at 72 frames per second to mask the transition between frames.
     
    Ryiah and aer0ace like this.
  13. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    High FPS (60 instead of 30) is essential if you want to be able to quickly react and readjust things like mouse aim. The extra frames really help with being able to extrapolate where things are going (both regarding movement on screen and where your aim is going). There's even noticeable improvement in tests from 60 to 144 hz, though it is significantly less improvement than 30 to 60.

    That said, You can get pretty used to 30 fps and especially if the game is not super into predicting movement / mouse aim then 30 fps can do fine. Or if you are playing as a "casual" where your skill is still more of a limit than the hardware. Anything with a controller can be fine input-wise at 30 fps. Stick imprecision is a bigger factor there I'd guess.
     
    aer0ace likes this.
  14. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    I can tell a huge difference between 30 FPS and 60 FPS. 30 FPS feels terrible to me. I can even feel a big difference between 60 FPS and 144 FPS.

    24 FPS is for non-interactive movies. 24 FPS would feel completely horrible in a competitive first person shooter style game. Also, some games run certain visual effects at lower frame rates for stylistic reasons, but still run the game at 60 FPS to make sure it feels smooth to play.
     
    G_Trex, EternalAmbiguity and aer0ace like this.
  15. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    3,023
    With regards to your question about 17 or 18 ms instead of 16 ms: If you have V-sync disabled, it probably won't affect gameplay too much. But if you have V-sync enabled, each time your frametime is 17 or 18 ms, your game with briefly sync to 30 FPS instead of 60 FPS. It is how V-sync works unfortunately. With V-sync enabled, 17 ms frametimes cause the game to bounce between 60 FPS and 30 FPS. It is very jarring.
     
  16. Zuntatos

    Zuntatos

    Joined:
    Nov 18, 2012
    Posts:
    612
    Triple buffered vsync stops this 30-60 jumping right? But it introduces basically 1 extra frame of latency on top of the vsync latency.
     
  17. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    It determines your framerate.

    Divide 1000 by number of milliseconds per frame, and you'll get the framerate of your game.

    16.5 ms is 60 fps.
     
    G_Trex likes this.
  18. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    No no no no. That's not the rule at all. The rule is everything related to rendering should come in at 16ms or less. This is so that your frame rate stays consistent.

    Everything else can take much longer. Depending on your game, input doesn't need to happen every frame (although it should be close). And some things like path finding can actually take seconds to calculate without affecting your player's experience.

    So get everything that relates directly to rendering optimized, and shift everything else off the main thread.
     
  19. unitedone3D

    unitedone3D

    Joined:
    Jul 29, 2017
    Posts:
    160
    Dear G_Trex, just a 2 cents.

    I wrestled with that question too and I guess it depends; such as the type of game made (a large determinant of whether it does or not, matter); there are more passive games/slow games...that don't require high frame rates because everything is overall 'calm' in terms of action on screen...like as said by others; point-click game (Myst), graphic novels JPG...but for certain types of games, mostly action oriented, then it becomes more important to sustain high frame rate in order to increase visual readability of movements/animations and make faster input/responsiveness of controls-to-actions happening on screen; it is very Very important in games like fighting games (traditional.. Street Fighter), because you need to read quick movements/reflexes and the characters move at the speed of light; if lacking frames (during moves/movements) the games feels 'unreadable/unplayable'...and in a sense, unresponsive because you just can't read what is happening in front of you (and your can't read/map what you are 'pressing' on the gamepad...you're just pressing randomly and there is disconnect between you pressing on pad/keyboard and what's happening on screen)...thus a mess of saccade/jerky frames 'slideshow' happening reall quick...it shows as 'holes/gaps' in the animation (lack 'in between' frames in the animation movements). Smooth framerate (at 60fps min.) is now asked by many games in almost all games (on PC...on consoles it's coming too...Xbox Series X will offer 120 fps mode (at reduced graphics)) for certain games (devs can do that on that console), double 60; it's always a balance between squeezing more frames/frame rate at the expense of game's graphical quality. FPS (First Person Shooters) games require high frame rate (espeically, online multuiplayer ones because action is fast-paced..and any moment you can perish...it's so 'tight' that '1 frame' can be between losing or winning...same thing in fighting games; 'frames' are oftenly said..like 1 frame in a special move can make you win or lose (because that 1 frame...gives you 1 frame advantage/0.27ms advantage that can make you win). In a shooter game, a bullet is in the ms ....thus, that 1 frame can make that bullet in ms make you win (because it's all it needed extra to make you win). That is why highly competitive games require higher frame rate; they depend on fast response/fast input/clear readability (visually)/1 frame (extra or less) can make you be the competitor that wins, or lose; that much it is competitive and high frame rate dictate results/performance in the competition. IF you are faster than your opponent (and have better readability/frame rate) you have advantage; you can win.

    In my POV, I feel frame rate is all over the place...I am also a bit surprised when I hear people say ''no difference between 30 or 60...''...that amazes me. It may be possible that some people have difficulty detecting this difference or don'T care at all/put not eye investment into that...it takes a trained eye to see it; 60 is fluid, 30 is less fluid and feels slightly 'jarring/slugghish/jerkyframe'..lack there is lack of something in the movement; you can still 'read' it enough..as others said..films are 24fps cinema standard (long story...but this was chosen for several reasons..conveniency/need less frames/less film roll (back then..now it's digital DCP files))/24 fps is a 'dreamy effect' called 'strobbing' effect..kind of like when you put your hand in fron the monitor and move it fastly (you will see 'frame' of your hand moving..that is the 'jerky' strobbing effect of lacking frames). It was called dreamy because it feels 'in the past' 24 fps gives an 'old feeling' to films...so they feel 'like they happened before'..instead of 'shot Live' (Live TV/Reality TV..which that one depends on high frame rate..in films it is 48fps..double 24; and it feels more 'lively'..like it was shot yesterday...).

    In computer games, most rely on better readability and 24 is low...bare minimum..you will detect 'holes' in the animation/lacking frames...thus a jerky/saccade-like 'slideshow' feel to the whole visual readability. I would 24 is really bare minimum to make most moves readable...at 15fps you Really feel like there is Total Lack of 'Frames' to 'read' movements....30 okish, not Bad..but not great either; it can suit though....it's standard for consoles...we got used to it..and consoles used tricks to fool you into thinking that 30 looks more than it is...they use motion blur (object motion blur..and scene motion blur on camera); motion blur blurs these small number of frames...and this reduces the 'holes' in between frames...they blend in with each other better...but if you look at games like Doom Eternal that have motion blur and run at 60fps at least...you feel the motion blur is much more 'smooth'..almost like a 'trail effect'..because there are just much more frames there...to blur.; thus more visual content / per ms....some think the motion blur feels too much; like a 'smearing'....trail effect...rather than something that heelps; that is subjective. Many turn off motion blur (I wrestled with that..as to put moblur in my game or not; decided not to; but I might add it as option; It was surprised that PC games hate motion blur with a passion except in games like Doom Eternal that have Pristine Motion Blur that is high quality and not overbearing/smudging the image...while console users...care less and are 'just used to it.' so if there is motion blur...they'll get used to it..but PC gamers will complain immediately and want it removed); It's understandable...visual readability of game is crucial for enjoyment and becoming skilled at it...having a 'clear' image that is not a smeared motionblur thing or a jerky saccaded saccaded of frames...helps a lot. That Xbox Series X will give 120 fps with abit reduced graphics...is tell tale signs of things coming...we will see new GPUs that can reach 120 fps in HD 1080p at least with very high quality CG like graphics (and soon will be higher res..not yet 4K res...but it's coming; 4K res is so demanding and very few 4K monitor users/TVs yet..it'S still 'new/niche'...). Thus, to end, it depends on the type of game you are making..if not much fast/fast-paced action in yours...and it's quite calm/you can take your time (lkie pointn click game) then it won't matter as much, and 30 suffices...but 60 gives a nice 'veneer'/it looks just more slick...even for a lowpaced game that does not require it (OS like Mac used 60 fps...for moving the mouse around..it's so smooth...it feels responsive you can 'read' the mouse cursor moving aroudn the desktop...it's smooth/slick and responsive..that is better then watching a jerky saccade like cursor moving aroudn on OS). Using Unity same thing...you look at the 3d models and move the cursor around...need strong GPU...to get 60 fps 'responsive' work place.

    Just a 2 cents.

    PS: I would say, currently, the largest problem for games...is not low frame rate..it's micro-stutter/micro-stuttering...jerky like 'hiccuping' frames..that 'freeze' for a milllisecond..and it's jarring...your eye detects it and it Completely takes you out of it/out of the experience. I used to not care/not look about that...but with time our eye becomes quite tuned to that...like 'looking for it...looking a slightl micro-stutters...'...some people don't even notice/don't care...but many gamers do. You can play the game/enjoy it...but your enjoyment will suffer..because you will be disengaged in the game - if you Do 'see it/notice it'...if you don't notice or do on 'purpose' 'to ignore it'..then it won't matter as much and won't care...but most do..because it is pretty big/jarring effect/visual artifact where the game 'freezes' litteraly from a micro-sec...you see it. The 'micro-pause/freeze'....this happens many times in certain games and it becomes unbearable because your brain 'is fixed on that tiny problem'....the whole time. Having a smoother frame rate that is sustained/'locked' if you will...is very important because it means the engine keeps the same frame rate the whole game sessions and there is 'frame skipping/stuttering'...in Unity you have to verify that (many Unity games in 3D suffered micro stuttering...due to mostly high RAM need; if you lack RAM microstuttering is all over the place because you need memory to hold all scene assets (loaded) and allow GPU/CPU to do job in that 16ms alloted time), just check games like ASsassin's Creed Odyssey or Origins...they say they are badly optimized/bad memory optimization..they have micro-stuttering peppered everywhere...on PC espeically (these games (based on Anvil 2.0 Engine) requite High RAM to load entire gigantic world; or else if lacking RAM, you get a poor stuttering game experience). One last thing I noticed, if there are not enough 'steps' in the game rendering (Time/Delta Fxied Steps) your game can 'lack frames' in Unity (lack it'S bizzar, the movement is lacking 'in between frames'..just because there not enough 'time steps' in between rendered by Unity Engine; so must adjust that to make sure to go low as possible in that 16ms and get the most steps/frames you can (you don'T want your game to play at a high 120fps....but the movement/animations by engine are display/render 30 frames per second; it will not feel 120).
     
    Last edited: Aug 5, 2020
    G_Trex likes this.