Jump to content

[1.12.x] ShowFPS


linuxgurugamer

Recommended Posts

An old mod by @m4v, hasn't been updated since 1.1

This started out as a simple framerate counter in the top right corner of the screen.

Major update 0.3.0

Added a graph window to show FPS over time.  The Graph shows current FPS, a moving average of the FPS, and the Simulation rate (ie:  how much is it lagging, related to yellow/red clocking).  It can also show a line of a normal sim rate (no lagging).
Along the left of the graph will be a scale for the FPS.  Along the right will be a scale for the symrate

New Dependencies

Usage

  • Press F8 for toggle it.
  • Ctrl+F8 will enable a *very* minimalist benchmark showing the average and lowest framerate. (must be visible first) Benchmark is disabled
  • You can drag the counter to where you like and change the default shortcut in the settings.cfg file.
  • To open/close the window, use the new toolbar button:

Kcd5bLh.png

Graph Window

wQw1bda.png
Graph Window Controls

Buttons

Refresh                    Redraw the graph
Clear                    Clear all data form graph 
Rescale                    Rescale the graph to fix all the data.

Toggles

Show Max Symrate        Show a grey line of what the normal (no losses) symrate should be
Periodic auto-rescale    Will automatically rescale the graph once a minute, if necessary

Sliders

Transparency            Lets the background of the graph be transparent.  Only takes effect on newly drawn lines or by resizing the graph
Frequency                How often to plot a datapoint

Resizer

A resizer control is at the lower right of the screen.  Click and drag it to resize the window

The toggle and slider settings are saved between game sessions

 

Source Code: https://github.com/linuxgurugamer/ShowFPS

SpaceDock: https://spacedock.info/mod/1757/ShowFPS

It is available in CKAN,  CKAN has been updated with the new dependencies

License:  LGPL

 

  https://www.patreon.com/linuxgurugamer

Edited by linuxgurugamer
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hey thanks for all your work on these mods! Tiny issue I found might be easy for you to fix.. maybe just z-index type setting?

When I first installed and booted up KSP I hit F8 to show fps and promptly moved it to very top of screen in main menu. When I loaded my game though I couldn't see the counter anywhere & thought it was broken.  The fps counter was actually rendering underneath the top bar. Was a little confusing for a while though..

https://imgur.com/jJn7BUo

Thanks!

 

 

 

Edited by SomeWebDevGuy
Link to comment
Share on other sites

18 hours ago, SomeWebDevGuy said:

Hey thanks for all your work on these mods! Tiny issue I found might be easy for you to fix.. maybe just z-index type setting?

When I first installed and booted up KSP I hit F8 to show fps and promptly moved it to very top of screen in main menu. When I loaded my game though I couldn't see the counter anywhere & thought it was broken.  The fps counter was actually rendering underneath the top bar. Was a little confusing for a while though..

https://imgur.com/jJn7BUo

Thanks!

I'll take a look, it's using some really old Unity code, I may be able to replace it.

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
On 10/22/2018 at 11:32 PM, Burning Kan said:

1.5.1-worked confirmed

Can not confirm this message.

For me it does not work as intended. FPS-counter is in top LEFT corner and not movable. Editing the position-values in settings file has no effect. Counter counts ;) - but not where it should do it. Testet in modded 1.5.1 and CLEAN 1.5.1, both with DLC installed, same result.

Btw, it works marvellous in my 1.4.5 install.

regards, Lami

edit:

link to log: https://www.dropbox.com/s/6yn87qnicqlo2px/output_log.txt?dl=0

link to Screenshot: https://www.dropbox.com/s/cegw95c4ag4wbt0/screenshot1.png?dl=0

Edited by Laminator
links to log & screenshot
Link to comment
Share on other sites

  • 8 months later...
On 8/26/2019 at 8:53 PM, jpinard said:

I'm not sure why, but the fps counter will not show up when I hit F8.  Wondering if anyone has some suggestions?  Using latest version of the game.

It's showing up for me in 1.7.3.

It's also in the upper left hand corner, very small, and it doesn't want to move.

That said, I've also just installed it and haven't looked at the config file so it could be that I just need to make an adjustment or two.

Link to comment
Share on other sites

@jpinard Hit F8 on the main menu before loading or starting a game, Then dragging it away from top so it doesn't start out underneath the top bar (think that's what I did but haven't played in a while) Some people say it's not movable though anymore so might be broken with latest KSP updates

Edited by SomeWebDevGuy
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 3 weeks later...

Hello @linuxgurugamer This add-on is really useful, to show the FPS, once is faster than others in the market, but there is any way to disable the log?

Why do we need about 100 messages per second in log, logging the speed?

[LOG 16:03:12.755] ShowFPS.OnGUI, curFPS: 104.9495, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.757] ShowFPS.OnGUI, curFPS: 104.9495, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.765] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.769] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.775] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.778] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.785] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.788] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.794] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17
[LOG 16:03:12.796] ShowFPS.OnGUI, curFPS: 103.344, fpsPos: (x:0.00, y:0.00, width:200.00, height:17.00),  size.y: 17

For now I have the problem solved with a private version of it, but that/fix might help the other KSP users.

 

 

Edited by pmborg
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...