The FPS Thread - FPS, Hz, Bypass and more.
Mar 16, 2019 9:24:58 GMT -5
ChilliusVGM, dov36kaizo, and 9 more like this
Post by Zhander on Mar 16, 2019 9:24:58 GMT -5
As some of you may know, not too long ago RobTop confirmed the addition of a fully functioning FPS Bypass in one of the following updates, which undoubtedly raised a lot of different opinions regarding the legitimacy of the infamous currently used bypass. More recently, in the now official Discord server, he stated that it will work for Windows and will make the game work the same way for every refresh rate, which sparked again the interest of some in this now kind of old topic. However, a common issue I've noticed while reading people talk about this is that not many seem to fully understand what most of the terms and words used here mean, misconceptions are everywhere and way too many debates are caused by the lack knowledge on the matter.
I've decided to write this thread in order to try and answer some of the most often asked questions and make it as simple as I'm able to for everyone to understand, starting with the basics.
IMPORTANT NOTE: Some of the topics in this thread have already been discussed extensively. My intention is to help everyone develop their own opinion with the correct data, but this is not the place to express your thoughts. If you want, you can start a different thread about it in the GD Debate board.
What is FPS?
FPS (Frames Per Second) is a unit that measures the amount of times an image (frame) is displayed per second. While you use your computer, phone, TV or any device with a screen, what you're seeing is always a constant number of frames being repeated each second. Movement is an illusion caused by a difference in those frames, which means you never actually see movement on a screen but your brain interprets the different images as such.
When you play a game, the Graphics Card (GPU, Graphics Processing Unit) inside of your computer is constantly receiving images written by said game. These images are stored in a small memory, called a buffer, and then sent to your monitor to be displayed for you. The speed at which these images are being read, stored and sent is what we refer to as FPS, and it varies depending on how powerful your GPU is. However, the speed at which your monitor displays those images (measured in Hertz) and therefore the speed at which you'll be able to see them doesn't match this number in most cases.
What is Hz/Refresh Rate?
Hz (Hertz) is the unit used to measure the refresh rate of your monitor. This is the speed at which the images are being displayed on your screen and it's very different from your FPS. While the later will constantly go up and down during your playthrough, your refresh rate will stay the same no matter what and, in fact, will keep being the same even if that means displaying wrong frames.
Common monitors have a refresh rate of 60Hz or 144Hz, meaning they display either 60 or 144 frames per second. A monitor is unable to display frames faster (or slower) than its refresh rate, so it will keep showing you the same number of frames even if your FPS are higher. Alternatively, if your FPS are lower, the monitor will display the latest frame available again until a new one is ready. Ideally, you want your FPS to match the number of your monitor's refresh rate to avoid displaying errors.
A display error happens when something during the process of writing, reading, storing, sending and displaying a frame goes wrong. For example, in some cases a game will not be done writing a frame when the monitor reads the buffer to display it, which can lead to part of the earlier frame being shown on top of what was supposed to be a new one. If significant motion happened during those frames, you'll be able to notice a cut in the image. This is called screen tearing. An even more common but unknown error happens when your FPS is lower than your refresh rate while not being a multiple of it, which will cause the monitor to display some frames more times than others and cause stuttering.
What is vSync?
Earlier, I mentioned how the ideal scenario is having your FPS and refresh rate be the same number. Vsync/vSync/VSync (Vertical Synchronization) attempts to achieve this by enabling something called Double Buffering, which as the name suggests, doubles the amount of buffers in use. This way, the process of displaying an image is divided in two sectors, one in which the image is being writen and stored and other in which it's being sent and displayed, with those two never happening on the same buffer and, that way, getting rid of issues like screen tearing. Once the writer (the game) and the reader (the monitor) are both done, the buffers are swapped and the monitor can display that frame as the process starts all over again with the next frame.
Since this process can not start until the currently processed frame is done, the speed is limited by how fast your monitor can read/display that frame. This means that, no matter how powerful your GPU is, it will always work at a speed that matches your monitor's refresh rate, so you will have your FPS and Hz numbers matching as long as your GPU doesn't fall behind and is able to produce the same FPS or higher than your monitor's refresh rate. If it couldn't keep up, it would most likely cause some noticeable stuttering.
What is Input Latency?
Input latency or input lag, often wrongly called input delay, refers to two situations: the span of time that occurs between a monitor receiving a signal and displaying it or the amount of time it takes for your computer to process an action (like pressing a button) and display it on screen. Here, we will use the second definition.
Actions effectuated in a game aren't instantaneous. It takes time for your computer to read and understand what you've done and send a proper response, which then takes time to happen on your monitor for you to see. This response/display time is measured in ms (milliseconds; a thousand of a second), and it be shorter the more powerful your computer is or increase otherwise, but it will never reach zero. In online games, milliseconds are also used to measure the time it takes for your computer to send your action to the server in which the game is stored and for the action to finally happen, which can take a much longer time depending on how far away from said server you are located, among other things.
Does higher FPS mean lower Input Latency?
In short, yes. Even with a lower refresh rate, if your computer is able to produce a high amount of FPS your actions will be more accurate and your monitor will have a higher chance of picking up the exact frame in which you effectuated it, making it feel more responsive no matter the refresh rate you play with. However, a higher refresh rate will have no effect over this, which is a very common myth nowadays.
What's the difference between 60Hz and 144Hz or higher?
This is probably one of the most frequently asked questions and also one of the worst misinterpretations that have ever happened in the community. To answer it, I first need to explain that Geometry Dash is a heavily frame-dependant game. This means that the way the game works depends a lot on the number of frames per second that are being processed, and changing that number will make the game work in a way that wasn't originally intended to, which in most games would simply be considered cheating. Now, don't fire the alarms yet and keep reading, I'll divide this explanation in two to make it easier to understand:
It's worth mentioning that RobTop confirmed there will be an implemented "FPS Bypass" (which I'll explain in detail next) and equal physics for everyone in the future, which could mean that he changed the way vSync works (making the Bypass a completely useless feature) or fixed the way collision checks happen, as explained above. Both options will end up feeling closer to the current 60Hz experience, so brace yourselves.
What is the FPS Bypass and how does it work?
The FPS Bypass is an external tool that was created as an attempt to solve the issue caused by the difference between 60Hz and higher refresh rates. As its name implies, it allows the game to bypass the 60FPS cap, making it possible to choose a different FPS limit (with 144FPS providing the same experience, bugs included, as a 144Hz monitor with vSync enabled for lower refresh rate monitors, with the exception of not being able to actually see 144FPS). This tool calls a function of Cocos2d-x, the engine in which Geometry Dash is built in, named CCDirector::setAnimationInterval (that you can check for yourself by clicking on it), which sets the delay between frames.
If you're interested, here's the full code that makes this tool work, provided by Absolute in his Mega Hack v5:
Source: github.com/absoIute/Mega-Hack-v5/blob/master/src/FPS%20Bypass/main.cpp
Thakfully, you don't need to understand what any of that means to know how it works and what it does.
Is using the FPS Bypass considered cheating? Why?
Currently, it is. Although, please consider that this is a topic with no objective points of view before judging: people have different opinions on what should and should not be considered cheating, so yours may be different from the popular opinion.
Cheating (commonly called "hacking"), by definition and in this context, is the act of gaining advantage over dishonesty or unfairness. There's different ways to play a game and, as long as you use means given to you by the game itself without an error being the cause of any of them, it will usually be considered proper or legit. However, the line between legitness and cheating becomes blurry the further you delve into taking advantage of bugs, using external tools, exploits, etc. Such methods can be used to improve the game experience (usually referred to as "mods" if they're part of an external tool) or even change the way things look (such as texture packs or "skins"), but they can also simplify or facilitate parts of the game and even the game itself in a way that gives a clear and unfair advantage over other players (exploits, or "hacks").
While the FPS Bypass lands on an uncertain spot between these two sides, it certainly is a tool that modifies the way the game is intended to work in order to give an arguably unnecessary advantage to the player using it over someone who isn't, which in the vast majority of communities falls under the cheating label. In addition to this, while 144Hz and higher refresh rate monitors allow an increase in the FPS cap by enabling vSync, this increase is limited to that exact number; on the other hand, the FPS Bypass allows you to fully control that limit and even completely remove it.
Is enabling vSync with 144Hz or higher considered cheating? Why?
I've purposefully saved what I consider the most controversial question for the last one, since it will most likely cause a negative response in some people no matter how I try to approach the subject and there's a lower chance of people reading up to here. Just for the sake of keeping this thread safe and clean, I'm going to ask you, the person reading this, to take this information and use it to form a more clear, personal point of view, but not share it here. There are other places where you can start a debate freely. With that in mind, on to the actual question:
It is not. Enabling vSync with a higher refresh rate than 60Hz, as previously explained, changes the way the game works due to the way vSync is implemented, so why isn't it considered cheating? Well, there are a few reasons, with the most important ones being the possibility of screen tearing happening without vSync in higher refresh rates, people simply enabling it due to not really knowing how it works or what difference it makes, avoiding screen tearing by setting a high refresh rate monitor down to 60Hz for one single game being a fairly annoying and tedious process in compasiron to enabling a single option and complains of "why wouldn't I use something I've paid money for". All of these reasons are valid on their own, yet it doesn't change the fact that this is still taking advantage of something that wasn't implemented properly.
There really isn't anyone to blame at this point, though. One could argue that it's the developer's fault for not fixing the mistake sooner or the player's fault for taking advantage of it, but that's a subjective opinion and taking it as a fact would be the actual mistake.
With the future update, it has been confirmed that this will no longer be an issue. We don't know how it will work yet, so we can only theorize (which I've already done, some questions above), wait and hope the solution pleases as many players as possible. It will not be well received by everyone, that's something we can be sure of, but it will hopefully be for the better of the game.
If you have read through all of this up until this point, I hope everything in relation to any of the questions addressed in this thread has been cleared of any possible doubts. Of course, if you still have any or simply want to ask something related to it, you can use this thread and I or other people with enough knowledge on the matter will reply and attempt to give you a proper answer.
Credits to Stardust, who patiently explained me everything I wasn't aware of yet, and Absolute, who created the currently used FPS Bypass and gave me permission to link here, along with other basic explanations about it. Thank you, both!
I've decided to write this thread in order to try and answer some of the most often asked questions and make it as simple as I'm able to for everyone to understand, starting with the basics.
IMPORTANT NOTE: Some of the topics in this thread have already been discussed extensively. My intention is to help everyone develop their own opinion with the correct data, but this is not the place to express your thoughts. If you want, you can start a different thread about it in the GD Debate board.
What is FPS?
FPS (Frames Per Second) is a unit that measures the amount of times an image (frame) is displayed per second. While you use your computer, phone, TV or any device with a screen, what you're seeing is always a constant number of frames being repeated each second. Movement is an illusion caused by a difference in those frames, which means you never actually see movement on a screen but your brain interprets the different images as such.
When you play a game, the Graphics Card (GPU, Graphics Processing Unit) inside of your computer is constantly receiving images written by said game. These images are stored in a small memory, called a buffer, and then sent to your monitor to be displayed for you. The speed at which these images are being read, stored and sent is what we refer to as FPS, and it varies depending on how powerful your GPU is. However, the speed at which your monitor displays those images (measured in Hertz) and therefore the speed at which you'll be able to see them doesn't match this number in most cases.
What is Hz/Refresh Rate?
Hz (Hertz) is the unit used to measure the refresh rate of your monitor. This is the speed at which the images are being displayed on your screen and it's very different from your FPS. While the later will constantly go up and down during your playthrough, your refresh rate will stay the same no matter what and, in fact, will keep being the same even if that means displaying wrong frames.
Common monitors have a refresh rate of 60Hz or 144Hz, meaning they display either 60 or 144 frames per second. A monitor is unable to display frames faster (or slower) than its refresh rate, so it will keep showing you the same number of frames even if your FPS are higher. Alternatively, if your FPS are lower, the monitor will display the latest frame available again until a new one is ready. Ideally, you want your FPS to match the number of your monitor's refresh rate to avoid displaying errors.
A display error happens when something during the process of writing, reading, storing, sending and displaying a frame goes wrong. For example, in some cases a game will not be done writing a frame when the monitor reads the buffer to display it, which can lead to part of the earlier frame being shown on top of what was supposed to be a new one. If significant motion happened during those frames, you'll be able to notice a cut in the image. This is called screen tearing. An even more common but unknown error happens when your FPS is lower than your refresh rate while not being a multiple of it, which will cause the monitor to display some frames more times than others and cause stuttering.
What is vSync?
Earlier, I mentioned how the ideal scenario is having your FPS and refresh rate be the same number. Vsync/vSync/VSync (Vertical Synchronization) attempts to achieve this by enabling something called Double Buffering, which as the name suggests, doubles the amount of buffers in use. This way, the process of displaying an image is divided in two sectors, one in which the image is being writen and stored and other in which it's being sent and displayed, with those two never happening on the same buffer and, that way, getting rid of issues like screen tearing. Once the writer (the game) and the reader (the monitor) are both done, the buffers are swapped and the monitor can display that frame as the process starts all over again with the next frame.
Since this process can not start until the currently processed frame is done, the speed is limited by how fast your monitor can read/display that frame. This means that, no matter how powerful your GPU is, it will always work at a speed that matches your monitor's refresh rate, so you will have your FPS and Hz numbers matching as long as your GPU doesn't fall behind and is able to produce the same FPS or higher than your monitor's refresh rate. If it couldn't keep up, it would most likely cause some noticeable stuttering.
What is Input Latency?
Input latency or input lag, often wrongly called input delay, refers to two situations: the span of time that occurs between a monitor receiving a signal and displaying it or the amount of time it takes for your computer to process an action (like pressing a button) and display it on screen. Here, we will use the second definition.
Actions effectuated in a game aren't instantaneous. It takes time for your computer to read and understand what you've done and send a proper response, which then takes time to happen on your monitor for you to see. This response/display time is measured in ms (milliseconds; a thousand of a second), and it be shorter the more powerful your computer is or increase otherwise, but it will never reach zero. In online games, milliseconds are also used to measure the time it takes for your computer to send your action to the server in which the game is stored and for the action to finally happen, which can take a much longer time depending on how far away from said server you are located, among other things.
Does higher FPS mean lower Input Latency?
In short, yes. Even with a lower refresh rate, if your computer is able to produce a high amount of FPS your actions will be more accurate and your monitor will have a higher chance of picking up the exact frame in which you effectuated it, making it feel more responsive no matter the refresh rate you play with. However, a higher refresh rate will have no effect over this, which is a very common myth nowadays.
What's the difference between 60Hz and 144Hz or higher?
This is probably one of the most frequently asked questions and also one of the worst misinterpretations that have ever happened in the community. To answer it, I first need to explain that Geometry Dash is a heavily frame-dependant game. This means that the way the game works depends a lot on the number of frames per second that are being processed, and changing that number will make the game work in a way that wasn't originally intended to, which in most games would simply be considered cheating. Now, don't fire the alarms yet and keep reading, I'll divide this explanation in two to make it easier to understand:
- In a normal scenario, with most games and common use, the difference between your monitor's refresh rate is only the smoothness that you'll be able to notice due to a higher number of images being displayed per second, as long as your GPU is able to keep up with that number, which presents no other advantage other than a tiny, barely noticeable increase in your personal reaction time to an event in a hypothetical game where said reaction time actually matters, which isn't nearly as common as you would think it is and, in fact, simply doesn't happen unless you're the most hardcore of hardcore gamers out there, fighting for a place in some ultra-demanding and difficult game with an avid competitive community (again, hypothetical). The truth is, in most online games this increase is insigificant due to the already existing latency caused by Internet connection and offline games simply aren't that demanding.
- In Geometry Dash, however, there are more factors that come into play. Normally, the game will still work at a limited 60FPS because that's how it was made to be, but because of the way vSync was implemented (which isn't something you will see in many other games), you can in fact raise that cap to whatever your refresh rate is able to get to. Being a frame-dependant game, GD simply can't work properly with a higher amount of frames and things start to go slightly wrong and increasingly worse as you crank up those Hz. Everyone has probably heard of "refresh rate bugs" by now, so now you also know what causes them. However, that's not everything you wanted to hear about, I assume.
Yes, the increase in FPS caused by this "unintentional feature" makes the game more reponsive, which is only achievable this way, no matter how powerful your actual computer is. This effectively decreases input latency, which, in short (and as I assume most of you were waiting for), makes the game slightly easier to control.
And... that isn't the end of it. I'll throw bit of reverse engineering here since RobTop doesn't give us a changelog and the game isn't open source, meaning we have no way to know how it actually works, so take the rest of this paragraph with a grain of salt. The nature of the game being frame dependant and the way it breaks as soon as you force it out of its safe 60FPS zone suggests that, instead of checking for collisions and such every certain number of frames, it does so a fixed number of times per second, something that's usually advised against and you will not find in many games. While it works just fine if you keep the game below a certain FPS cap, this method breaks terribly as soon as you go any higher. If this theory is true, we currently don't know the extent of how broken the game is on higher FPS, but we could assume statements like "Ship game mode is easier to control" are partialy caused by this issue and not only the input latency difference (which would make much more sense) and, in case it got fixed with a future update, the game would feel way closer to how 60Hz players feel right now independently of your personal refresh rate. You're allowed to panic now.
It's worth mentioning that RobTop confirmed there will be an implemented "FPS Bypass" (which I'll explain in detail next) and equal physics for everyone in the future, which could mean that he changed the way vSync works (making the Bypass a completely useless feature) or fixed the way collision checks happen, as explained above. Both options will end up feeling closer to the current 60Hz experience, so brace yourselves.
What is the FPS Bypass and how does it work?
The FPS Bypass is an external tool that was created as an attempt to solve the issue caused by the difference between 60Hz and higher refresh rates. As its name implies, it allows the game to bypass the 60FPS cap, making it possible to choose a different FPS limit (with 144FPS providing the same experience, bugs included, as a 144Hz monitor with vSync enabled for lower refresh rate monitors, with the exception of not being able to actually see 144FPS). This tool calls a function of Cocos2d-x, the engine in which Geometry Dash is built in, named CCDirector::setAnimationInterval (that you can check for yourself by clicking on it), which sets the delay between frames.
If you're interested, here's the full code that makes this tool work, provided by Absolute in his Mega Hack v5:
#include <windows.h>
#include <iostream>
typedef void* (__cdecl *fSharedApplication)();
typedef void (__thiscall *fSetAnimationInterval)(void *instance, double delay);
fSharedApplication sharedApplication;
fSetAnimationInterval setAnimInterval;
float interval = 0; //this is changed externally
DWORD WINAPI Main_Thread(LPVOID lpParam)
{
interval = 1.0f / 60;
HMODULE hMod = LoadLibrary(L"libcocos2d.dll");
sharedApplication = (fSharedApplication)GetProcAddress(hMod, "?sharedApplication@CCApplication@cocos2d@@SAPAV12@XZ");
setAnimInterval = (fSetAnimationInterval)GetProcAddress(hMod, "?setAnimationInterval@CCApplication@cocos2d@@UAEXN@Z");
void *application = sharedApplication();
while (1)
{
setAnimInterval(application, interval);
Sleep(500);
}
}
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if (fdwReason == DLL_PROCESS_ATTACH)
CreateThread(0, 0x1000, &Main_Thread, 0, 0, NULL);
return TRUE;
}
Source: github.com/absoIute/Mega-Hack-v5/blob/master/src/FPS%20Bypass/main.cpp
Thakfully, you don't need to understand what any of that means to know how it works and what it does.
Is using the FPS Bypass considered cheating? Why?
Currently, it is. Although, please consider that this is a topic with no objective points of view before judging: people have different opinions on what should and should not be considered cheating, so yours may be different from the popular opinion.
Cheating (commonly called "hacking"), by definition and in this context, is the act of gaining advantage over dishonesty or unfairness. There's different ways to play a game and, as long as you use means given to you by the game itself without an error being the cause of any of them, it will usually be considered proper or legit. However, the line between legitness and cheating becomes blurry the further you delve into taking advantage of bugs, using external tools, exploits, etc. Such methods can be used to improve the game experience (usually referred to as "mods" if they're part of an external tool) or even change the way things look (such as texture packs or "skins"), but they can also simplify or facilitate parts of the game and even the game itself in a way that gives a clear and unfair advantage over other players (exploits, or "hacks").
While the FPS Bypass lands on an uncertain spot between these two sides, it certainly is a tool that modifies the way the game is intended to work in order to give an arguably unnecessary advantage to the player using it over someone who isn't, which in the vast majority of communities falls under the cheating label. In addition to this, while 144Hz and higher refresh rate monitors allow an increase in the FPS cap by enabling vSync, this increase is limited to that exact number; on the other hand, the FPS Bypass allows you to fully control that limit and even completely remove it.
Is enabling vSync with 144Hz or higher considered cheating? Why?
I've purposefully saved what I consider the most controversial question for the last one, since it will most likely cause a negative response in some people no matter how I try to approach the subject and there's a lower chance of people reading up to here. Just for the sake of keeping this thread safe and clean, I'm going to ask you, the person reading this, to take this information and use it to form a more clear, personal point of view, but not share it here. There are other places where you can start a debate freely. With that in mind, on to the actual question:
It is not. Enabling vSync with a higher refresh rate than 60Hz, as previously explained, changes the way the game works due to the way vSync is implemented, so why isn't it considered cheating? Well, there are a few reasons, with the most important ones being the possibility of screen tearing happening without vSync in higher refresh rates, people simply enabling it due to not really knowing how it works or what difference it makes, avoiding screen tearing by setting a high refresh rate monitor down to 60Hz for one single game being a fairly annoying and tedious process in compasiron to enabling a single option and complains of "why wouldn't I use something I've paid money for". All of these reasons are valid on their own, yet it doesn't change the fact that this is still taking advantage of something that wasn't implemented properly.
There really isn't anyone to blame at this point, though. One could argue that it's the developer's fault for not fixing the mistake sooner or the player's fault for taking advantage of it, but that's a subjective opinion and taking it as a fact would be the actual mistake.
With the future update, it has been confirmed that this will no longer be an issue. We don't know how it will work yet, so we can only theorize (which I've already done, some questions above), wait and hope the solution pleases as many players as possible. It will not be well received by everyone, that's something we can be sure of, but it will hopefully be for the better of the game.
If you have read through all of this up until this point, I hope everything in relation to any of the questions addressed in this thread has been cleared of any possible doubts. Of course, if you still have any or simply want to ask something related to it, you can use this thread and I or other people with enough knowledge on the matter will reply and attempt to give you a proper answer.
Credits to Stardust, who patiently explained me everything I wasn't aware of yet, and Absolute, who created the currently used FPS Bypass and gave me permission to link here, along with other basic explanations about it. Thank you, both!