v1.1.3: Adds a workaround against CET ImGui Ctrl Tab window switching mixing with the game action keys issue. Thanks to macf1an for providing details on the issue.
- reset avg - fps average counter reset button - show ms - show/hide frame time display - the last monitor window view state is retained (yes, there is user settings save/restore now)
The average reset button helps to eliminate outstanding rates that slip into the equation on game loading, minigame, inventory, etc screens that often run at max possible speed. Or just to catch a specific moment average. I could filter out these special game screen modes but then I'd need to add quite complex state checkup code that in turn would add some overhead so I decided it's better to have it just plain and fast.
The frame time value is just the opposite notation to the fps (1/fps) but indeed it may be helpful to have it immediately converted to milliseconds sometimes. E.g. to quickly compare it to some other readings in this form. It's the same as wavelengths and frequencies expressing the same underlying wave parameter (actually frame streams are waves :) ) yet confusing if you get both forms values to compare.
The buttons only show up in the CET overlay mode. In the normal mode (CET overlay hidden) they're hidden and the code handling the buttons is inactive (no toll on the performance).
The window settings are saved on the mod shutdown (usually on the game application quit). They should be saved immediately on a change but as I didn't want to add an extra overhead to the normal run time I moved it to the shutdown.
A note about settings files and mod managers: Vortex and some other mod managers may mess up with the managed mods files sometimes. If you're using a mod manager and you'll find your settings are not retained please check the mod manager settings.
Thank you. What you described is normal in this game with the DLSS3 enabled. Basically, DLSS3 feeds your video output at twice the rate of the game's rendering loop, similar to 100Hz TV sets, by duplicating frames. The extra frames are generated based on the game's original frames by the GPU to trick you into perceiving that the game runs at a higher frame rate than it actually does and to enhance moving details that the game renders at reduced quality for the DLSS3 upscaling. This relieves the game from the heavy job of rendering high quality video allowing it to run more smoothly by generating low quality frames instead, and creates illusion of watching higher quality video than it actually is generated. This is similar to interlaced video rates: while the frame rate is say 25fps, it consists of 50 field pictures (at half of vertical screen resolution). So the field rate is twice the frame rate which gives an impression of smoother movement. As already explained in comments below.
I hope that it can offer an option to turn off the avg fps or just replace it with 1% low fps. It could be a better choice to avoid the influence of some loading sceneries.
Hi Thanks for this mod. When Simple fps monitor is displayed in Photo mode when take photo game crash and if it's hidden no problem. P.S. Sorry for my english.
Thank you. However I cannot reproduce this issue and tbh. my mod code cannot crash the game in any mode. Please make sure to update your CET to v1.30.1 at least for the game v2.11
So after multiple days and even writing CDred support, I figured out that this mod was giving me the wrong readings in game with the new update and framegen turned on. It was reading 69.12 to 70.12 and not moving above or below this reading - which in turn was exactly half my refresh rate of my 144hz monitor.
I removed this mod and used rivatuner, and I was now getting the correct reading now at 138 fps, just a couple frames under my refresh rate of 144...which is how it should be with framegen turned on.
Just putting this out there if anyone was struggling on figuring out why your fps was half your refresh rate with the dlss 3 update like I was :(
"this is a simple tool to show an approximate frames per second rate (fps) based on the game program run rate.
The rate is calculated on the game program loop run time base - as a single frame is generated within a single program loop step and the program loop rate depends on the overall computer hardware performance this is the rate at which the game sends video frames to the video hardware."
It cannot learn about advanced graphic techniques used internally by the game to push data out to GPU. And in any case it's not designed to replace professional/high quality tools or provide a reference for any claims.
Hi, since the mod page says untested with Phantom Liberty DLC, I quickly wanted to mention that mod works without issue for me on game version 2.01 with Phantom Liberty DLC installed with the newest Cyber Engine Tweaks 1.27.0 (and also on Linux via Wine/Proton). Thanks anygoodname for creating the mod :-)
Hello anygoodname! I have tested the simple FPS monitor on game version 1.22 (with CET 1.13.0) and it works! Not the 1.1.3, but 1.1.0 does. Thanks for your work!
Not true on my side - works perfectly with the whole game range specified including the latest patch. Please verify your game health and other mods compatibility before posting any "issues" Please follow the Issue reporting note in the Description (can't believe I had to add it for such a simple mod but apparently some need a basic guidance even on that)
This is just a simple tool based on what is available in the CET. As to the resizing - the window resizes automatically to the text inside. It used to work fine with the previous CET generation but it looks the new one requires more adjustments with the new variable font sizes. Ughr... I hate to make things complex just to achieve simple effects...
It's fine to use if people checked the mod page and saw the images so they know which button does what, so it's not a gamebreaker but just something to note :P
I like it though despite the fast FPS display rate, I included it in my compiled and uploaded complete mod list so that's something ;)
EDIT: Noticed one thing. Every time I crouch and press TAB there's a little menu that shows up saying "fps_monitor", any way to stop this from happening? (Happens only with the overlay enabled.)
I'm not sure what you mean, I don't have any issues with the monitor window showing anything unexpected while performing any actions. Are you sure your CET hotkeys bindings don't overlap the game action keys bindings? Starting with the CET open overlay key.
It brings up some kind of selection menu. I have my CET overlay bind set to the asterisk key while Simple FPS Monitor is set to a different key not being used by the game.
Here's a quick showcase what happens everytime I crouch and hold TAB with FPS monitor enabled
Thanks. Unfortunately I have no idea what could cause it. I cannot reproduce such issue on my side and I cannot find anything in my code that could cause such issue. My mod seems to be affected by something else on your side - not only showing the main window on a game action key but also empty and not adjusted properly as if something blocked the code execution. I'd suggest to try it with a clean and default game and CET config and no other mods.
Also make sure you don't use any key used by the game to bind as a hotkey to my mod. BTW: did you install it with Vortex manager?
PS: my mod window name is: fps_monitor Your video is blurry so I cannot really read on the first two occurrences it but it looks it's a longer string which does not exist in my code. Only the third one is clear to read and matches my window title string. Are you sure your CET and installed mods config is correct?
First, thank you for this cool mod. Saves me the hassle of running gog overlay just for the fps counter. I have the same issue - with the mod active in-game, crouching + scanning (ctrl + tab) opens the ImGui window manager, with fps_counter as the only list item. This hotkey was added in v1.10 of CET: "Enabled ImGui keyboard navigation. (ctrl + tab to switch window, arrow keys to navigate)" My assumption is it works by capturing all visible mod windows and creating that navigable list. Since fps_counter is the only one visible when the CET overlay is off, it creates the one-entry list and plops it in the center of the screen. With the fps_counter hidden, the visible window list is empty and the hotkey is ignored on the CET side. I searched for any options to change the hotkey behavior in CET but I couldn't find any :\
Thanks again. I did some digging and it appears to be the expected ImGui behavior, so CET is just following orders.. Other mods seem to have had the same issue, including Time Dilation Overhaul, in an early release. It's easily fixable, I tested locally and it worked: I added "+ ImGuiWindowFlags.NoNav" to normalModeWindowFlags and it worked like a charm. Doesn't change the behavior with active CET overlay, only fixes the in-game conflict.
This is indeed the expected ImGUI behavior but as the CET is a specific implementation for the game it should respect the game built-in key functionality. I added a workaround in this mod (very similar to the one you pointed) and it seems to do the trick (soon to be released). Yet this is not the real solution to the underlying issue. I reported it to the CET devs. EDIT: it's even more complex as some mods use the windows to take user input and then the Ctrl Tab triggers both the crouch and scan and the window or windows switching affecting both in effect... not easy one to resolve.
BTW: I don't use Ctrl key for crouching, that's why I could not reproduce the issue on the previous reports. It's only thanks to your detailed description I could find what it's all about
Awesome, glad to have helped. Hopefully, one day someone will figure out how to trigger the benchmark fps counter in the normal game and remove dependency on any external overlays. Edit: Just in time for the mod's first birthday! I tested the update and it's fine, thanks! I have another observation in ImGui / CET behavior, may be useful when discussing with the CET devs. If you open the CET overlay, then ctrl+tab and select the fps_monitor window, then disable the overlay - pressing ctrl-tab in-game will still bring up the window selection, but this time the list is empty - just a dark rectangle. I guess they don't handle the NoNav situation perfectly. It's a rare scenario, but if someone encounters it - all they have to do is switch to another (non-visible in-game) window, while CET overlay is on.
The Ctrl Tab shortcuts overlap is a hard nut to crack for the CET devs. Both the game and the CET react to that in a way they affect each other. Neither the game neither the CET can second guess if the user wants to crouch and scan or switch CET windows. So the game turns on the crouch and scan modes while the CET shows its open window list on top and keep cycling between the windows in a loop as long as the keys are down. The game knows nothing about the CET. The CET is aware of the game but it cannot learn the user intention. Setting the window flags to skip navigation helps in this mod case as I don't need user input in this mod. But there are other mods that show interactive windows on top of the game UI, sometimes multiple windows and since you cannot use mouse to navigate between the windows you need to use the Ctrl Tab and then.. loop to the beginning... A partial remedy to that would be to change the window navigation shortcut in the CET but tbh I struggle to find anything both intuitive and easy to use on the keyboard already packed with the game actions.
77 comments
Adds a workaround against CET ImGui Ctrl Tab window switching mixing with the game action keys issue. Thanks to macf1an for providing details on the issue.
What's new:
- reset avg - fps average counter reset button
- show ms - show/hide frame time display
- the last monitor window view state is retained (yes, there is user settings save/restore now)
The average reset button helps to eliminate outstanding rates that slip into the equation on game loading, minigame, inventory, etc screens that often run at max possible speed. Or just to catch a specific moment average.
I could filter out these special game screen modes but then I'd need to add quite complex state checkup code that in turn would add some overhead so I decided it's better to have it just plain and fast.
The frame time value is just the opposite notation to the fps (1/fps) but indeed it may be helpful to have it immediately converted to milliseconds sometimes.
E.g. to quickly compare it to some other readings in this form.
It's the same as wavelengths and frequencies expressing the same underlying wave parameter (actually frame streams are waves :) ) yet confusing if you get both forms values to compare.
The buttons only show up in the CET overlay mode.
In the normal mode (CET overlay hidden) they're hidden and the code handling the buttons is inactive (no toll on the performance).
The window settings are saved on the mod shutdown (usually on the game application quit).
They should be saved immediately on a change but as I didn't want to add an extra overhead to the normal run time I moved it to the shutdown.
A note about settings files and mod managers:
Vortex and some other mod managers may mess up with the managed mods files sometimes.
If you're using a mod manager and you'll find your settings are not retained please check the mod manager settings.
Somehow this does not display correct FPS. GeForce Experience Overlay shows double FPS than this and the game feels buttery smooth, not 30FPS at all!
Gameversion is 1.63, heavily modded
What you described is normal in this game with the DLSS3 enabled.
Basically, DLSS3 feeds your video output at twice the rate of the game's rendering loop, similar to 100Hz TV sets, by duplicating frames.
The extra frames are generated based on the game's original frames by the GPU to trick you into perceiving that the game runs at a higher frame rate than it actually does and to enhance moving details that the game renders at reduced quality for the DLSS3 upscaling.
This relieves the game from the heavy job of rendering high quality video allowing it to run more smoothly by generating low quality frames instead, and creates illusion of watching higher quality video than it actually is generated.
This is similar to interlaced video rates: while the frame rate is say 25fps, it consists of 50 field pictures (at half of vertical screen resolution). So the field rate is twice the frame rate which gives an impression of smoother movement.
As already explained in comments below.
Thanks for this mod.
When Simple fps monitor is displayed in Photo mode when take photo game crash and if it's hidden no problem.
P.S.
Sorry for my english.
However I cannot reproduce this issue and tbh. my mod code cannot crash the game in any mode.
Please make sure to update your CET to v1.30.1 at least for the game v2.11
I removed this mod and used rivatuner, and I was now getting the correct reading now at 138 fps, just a couple frames under my refresh rate of 144...which is how it should be with framegen turned on.
Just putting this out there if anyone was struggling on figuring out why your fps was half your refresh rate with the dlss 3 update like I was :(
"this is a simple tool to show an approximate frames per second rate (fps) based on the game program run rate.
The rate is calculated on the game program loop run time base - as a single frame is generated within a single program loop step and the program loop rate depends on the overall computer hardware performance this is the rate at which the game sends video frames to the video hardware."
It cannot learn about advanced graphic techniques used internally by the game to push data out to GPU.
And in any case it's not designed to replace professional/high quality tools or provide a reference for any claims.
I'm updating the compatibility info now.
Crashes the game immediately after launch.
Drivers, CET and everything else updated.
Please verify your game health and other mods compatibility before posting any "issues"
Please follow the Issue reporting note in the Description (can't believe I had to add it for such a simple mod but apparently some need a basic guidance even on that)
Other than that, this is a handy tool to see your frame times if for example you use XBOX Gamebar which doesn't show this information.
I also think making this resizable would be beneficial due to it being squashed and hiding the reset avg and show ms text (4K and using 1.61)
Great job ^-^
As to the resizing - the window resizes automatically to the text inside.
It used to work fine with the previous CET generation but it looks the new one requires more adjustments with the new variable font sizes.
Ughr... I hate to make things complex just to achieve simple effects...
I like it though despite the fast FPS display rate, I included it in my compiled and uploaded complete mod list so that's something ;)
EDIT: Noticed one thing. Every time I crouch and press TAB there's a little menu that shows up saying "fps_monitor", any way to stop this from happening? (Happens only with the overlay enabled.)
I don't have any issues with the monitor window showing anything unexpected while performing any actions.
Are you sure your CET hotkeys bindings don't overlap the game action keys bindings?
Starting with the CET open overlay key.
I have my CET overlay bind set to the asterisk key while Simple FPS Monitor is set to a different key not being used by the game.
Here's a quick showcase what happens everytime I crouch and hold TAB with FPS monitor enabled
Unfortunately I have no idea what could cause it.
I cannot reproduce such issue on my side and I cannot find anything in my code that could cause such issue.
My mod seems to be affected by something else on your side - not only showing the main window on a game action key but also empty and not adjusted properly as if something blocked the code execution.
I'd suggest to try it with a clean and default game and CET config and no other mods.
Also make sure you don't use any key used by the game to bind as a hotkey to my mod.
BTW: did you install it with Vortex manager?
PS: my mod window name is: fps_monitor
Your video is blurry so I cannot really read on the first two occurrences it but it looks it's a longer string which does not exist in my code. Only the third one is clear to read and matches my window title string.
Are you sure your CET and installed mods config is correct?
I have the same issue - with the mod active in-game, crouching + scanning (ctrl + tab) opens the ImGui window manager, with fps_counter as the only list item.
This hotkey was added in v1.10 of CET: "Enabled ImGui keyboard navigation. (ctrl + tab to switch window, arrow keys to navigate)"
My assumption is it works by capturing all visible mod windows and creating that navigable list. Since fps_counter is the only one visible when the CET overlay is off, it creates the one-entry list and plops it in the center of the screen. With the fps_counter hidden, the visible window list is empty and the hotkey is ignored on the CET side. I searched for any options to change the hotkey behavior in CET but I couldn't find any :\
This is the CET issue however.
Please report it to the CET developers following the top Sticky Post on the Cyber Engine Tweaks site.
I did some digging and it appears to be the expected ImGui behavior, so CET is just following orders..
Other mods seem to have had the same issue, including Time Dilation Overhaul, in an early release.
It's easily fixable, I tested locally and it worked:
I added "+ ImGuiWindowFlags.NoNav" to normalModeWindowFlags and it worked like a charm. Doesn't change the behavior with active CET overlay, only fixes the in-game conflict.
I added a workaround in this mod (very similar to the one you pointed) and it seems to do the trick (soon to be released).
Yet this is not the real solution to the underlying issue.
I reported it to the CET devs.
EDIT: it's even more complex as some mods use the windows to take user input and then the Ctrl Tab triggers both the crouch and scan and the window or windows switching affecting both in effect... not easy one to resolve.
It's only thanks to your detailed description I could find what it's all about
Hopefully, one day someone will figure out how to trigger the benchmark fps counter in the normal game and remove dependency on any external overlays.
Edit: Just in time for the mod's first birthday! I tested the update and it's fine, thanks!
I have another observation in ImGui / CET behavior, may be useful when discussing with the CET devs. If you open the CET overlay, then ctrl+tab and select the fps_monitor window, then disable the overlay - pressing ctrl-tab in-game will still bring up the window selection, but this time the list is empty - just a dark rectangle. I guess they don't handle the NoNav situation perfectly. It's a rare scenario, but if someone encounters it - all they have to do is switch to another (non-visible in-game) window, while CET overlay is on.
The Ctrl Tab shortcuts overlap is a hard nut to crack for the CET devs.
Both the game and the CET react to that in a way they affect each other.
Neither the game neither the CET can second guess if the user wants to crouch and scan or switch CET windows.
So the game turns on the crouch and scan modes while the CET shows its open window list on top and keep cycling between the windows in a loop as long as the keys are down.
The game knows nothing about the CET. The CET is aware of the game but it cannot learn the user intention.
Setting the window flags to skip navigation helps in this mod case as I don't need user input in this mod.
But there are other mods that show interactive windows on top of the game UI, sometimes multiple windows and since you cannot use mouse to navigate between the windows you need to use the Ctrl Tab and then.. loop to the beginning...
A partial remedy to that would be to change the window navigation shortcut in the CET but tbh I struggle to find anything both intuitive and easy to use on the keyboard already packed with the game actions.