Advertisement
Guest User

Untitled

a guest
Jul 5th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.87 KB | None | 0 0
  1. WHY DISABLING THE FRAME LIMITER IN GTA GAMES IS A BAD THING
  2.  
  3. Doc by oasiz, contact info at the bottom.
  4.  
  5. GTA is coded like shit, kinda like stuff on old systems.
  6. Instead of saying "Apply friction 30 times in a second" and monitoring the time
  7. it actually does things like "Apply friction every time code loops"
  8. Since GTA runs at 30fps we can skip the time check and things run faster, right?
  9. Problem is that framerate is very variable in games nowadays and without the limiter
  10. it can run (or apply friction) many faster than they ever imagined.
  11.  
  12. Let's observe this in a way that is familiar to most: PAL vs. NTSC speeds in games
  13. The reason why PAL games ran slower than NTSC is as the code loop
  14. gets done 50 times a second instead of 60. Reason why it was coded like this
  15. is because every system was identical and it cost less CPU to ignore timing.
  16.  
  17. Values get adjusted until they fit, say, speed gets increased from 0 by
  18. 2 increments every "frame".
  19. What will the speed value be after one second?
  20. Yup, Speed would be 60 if the game ran at 60fps (Typical NTSC rate).
  21. But the speed would only be actually 50 with PAL!
  22.  
  23. Usually this isn't a problem, developers simply slowed down the game so that
  24. the ten extra frames from NTSC would "leak" in to the next second.
  25. This means that everything after 50fps would be put in to the next second.
  26.  
  27. But hey! Mario 3 runs at the same speed as the NTSC !
  28. Not exactly.. if you compare the physics, they actually just adjusted values by "eye" to get it
  29. as fast as the NTSC version. Physics for acceleration and jumping are different!
  30. Say.. instead of increasing speed by 2units every frame they alternated 2u and 3u to keep it "close".
  31. They simply changed the game logic to be close to NTSC but you can not get really accurate values without some more complex math that was would slow down games too much back in the day.
  32.  
  33. So how does this all relate to GTA Physics?
  34. In GTA they actually tied a lot of the game logic to time but for some of the things they "hardcoded"
  35. values that are tied to the game loops.
  36. This means that they adjusted values like friction under 30fps and they just settled with that.
  37. What they didn't try out is to actually change the FPS to say... 80fps and see how things change.
  38. Back when GTA3 was made, PS2 was the target platform. Turning the limiter off was a novelty feature
  39. when it came to PC gaming, it worked well with the 800MHz systems of the time, instead of 30fps
  40. you got something like 45-60fps. Nowadays it's a bigger problem. Instead of rates around 60fps you can
  41. get something closer to 130-200fps without the computer needing to do much lifting.
  42. This means that most of the stuff run like they normally would under 30fps but some things can
  43. potentially run 5-7 times faster. Imagine stuff like friction when reversing or loads of oversights
  44. when one thing completes 7 times faster than the other. It is something they did not test for.
  45.  
  46. In short,
  47. Turning off the frame limiter in GTA is BAD!
  48. Side effects may include:
  49. - Too much friction
  50. Reversing broken, impossible dodo takeoff, etc..
  51. - Softlocks
  52. Game code freezing and not progressing, usually happens after you die or take a mission
  53. +-Fucked up slopes/stairs
  54. You can literally fly away 100-200 meters away, and I mean launch from slopes/ledges
  55. when running. Sometimes even dropping from a sidewalk to the road can take 50% of your health.
  56. - Boats are fucked up
  57. This goes back to too much friction.
  58. - Handbrake is fucked up
  59. Friction
  60. - Missions take forever to progress
  61. Related to softlocks
  62. - Audio is glitched
  63. Audio / Ped lines / etc.. get called after a specific amount of frames, too high fps
  64. and the sounds will play over each other and non-stop almost.
  65. Imagine speeding up NPC horn-honking frequency and such by say.. 5 times.
  66. - Crazy flicker
  67. Things that go on/off say.. 2 times in a second (like wanted stars) will flicker like mad
  68. as they go on/off many times faster than usual.
  69. + Pushing cars
  70. You can literally flip cars over by running in to them as they don't get proper friction.
  71. For some reason they will be really light with a high framerate.
  72. - Broken AI / scripts
  73. Stuff like AI driven sections for small cut scenes can be totally off due to changed physics
  74. and coded "drive this path" scripts can be totally borken due to wrong frame/time references.
  75. + Helicopter takeoff
  76. A big plus is that helicopter takeoffs are nearly instant as the acceleration is tied to fps.
  77.  
  78. These are just some of the things that get changed, there are more side effects.
  79. Therefore the GTA community has decided to ditch runs that run without the limiter.
  80. GTA3 / VC run at 30fps and SA runs at 25fps.
  81.  
  82. "I don't understand anything you said, and you are a shithead!"
  83. Did you know that you can say it straight to my face? Catch 'oasiz' on IRCnet/Quakenet/Freenode.
  84. I'll gladly help you if you have any questions about this route.
  85. And I stream from time to time at http://twitch.tv/oasiz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement