[REL] TinyPedal - open source overlay APP for rF2 (Radar,Pedal,FFB,Deltabest,Relative,Fuel calculator)

Discussion in 'Other' started by svictor, Mar 14, 2022.

Tags:
  1. Trevor

    Trevor Registered

    Joined:
    Oct 6, 2022
    Messages:
    18
    Likes Received:
    16
    Well you were right - I needed some optimization help in a few areas. I went through the system level items first, ran some monitoring and saw improvement in the numbers. My do-nothing CPU usage was low but there, 1 to 3 percent, optimized and stays at 0 with a few jumps to 1.

    Spent a lot of time with that post's RF2 tips, edited the json file and made only a few small concessions to slightly better detail here and there, but I'd say he followed that post within 95%. Saw his update about vsync for non-GSync or Freesync monitors, and mine is not GSync, so I implemented that follow-up advice (144 refresh, 140 framerate lock, vsync on).

    Major improvement to RF2. I don't even notice all the visual details I turned off. That post said they're all hard coded and the settings just amplify them or dress them up. I'm not missing a thing with the special details switched off, had no idea. I started at the back of a 20 car grid with all 20 cars visible, at early dusk at Mid Ohio, and didn't see my fps go below 90. Mostly it was between 110 and 130. Previously I was around 70, plus stuttering and strange slowdowns and speedups. Biggest improvement is all that stuttering and slowmo hiccup is completely gone.

    I added CrewChief as I drove, no impact, then added TinyPedal and all was well. Saw maybe a 5 to 10 fps drop at the very very most once I was running both CC and TP.

    Thank you again for that link! Learned a lot in there and made some really significant improvements. Hoping this all carries over to online racing as I've only tested this offline so far.
     
    svictor, Capeta and davehenrie like this.
  2. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    741
    Likes Received:
    535
    rFactor2 could be much more user friendly out of the box just with few optimizations, I imagine how much people get frustrated the first time and never play again.
     
    svictor likes this.
  3. Trevor

    Trevor Registered

    Joined:
    Oct 6, 2022
    Messages:
    18
    Likes Received:
    16
    just learned that ensuring
    that was me when I was happy with ACC and enjoying it. I've just fallen away from ACC, very bored and frustrated with it. Decided to give RF2 a fair shake and put in the time to really solving the quirks and trying to work it all out. Very very glad I'm putting in the effort because it is well worth it. It's such a fantastic driving experience.
     
  4. Trevor

    Trevor Registered

    Joined:
    Oct 6, 2022
    Messages:
    18
    Likes Received:
    16
    Just learned that it's critical to be sure that you alt-tab back to RF2 after switching away. I have been clicking my mouse within the main screen that RF2 runs on, but that doesn't switch back to it. I think thay may very well have been a primary cause of all my stuttering issues. Just now I thought that I had some new problem because I launched TinyPedal after starting RF2 and driving a bit, switched to desktop to open TP and clicked back on the RF2 screen. Terrible stuttering and freezing. Escape key wouldn't work and I realized that RF2 was actually in the background. Alt-tab back to RF2 and everything was normal again.

    I'm learning...
     
    ebeninca likes this.
  5. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    741
    Likes Received:
    535
    Are you using borderless video mode instead of fullscreen?
     
  6. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    This is a hidden feature in RF2, which can be turned off (which really should be default).

    Steps:
    1. Exit RF2.
    2. Open player.json, search keywords Pause If Focus Lost , change true to false , and save.
    EDIT: it should be Inactive Sleep Time that needs to turned off, just set value to -1 to disable it.

    Now you never have to worry about low fps due to losing focus, such as caused by a random pop-up window (though losing focus will cause some game hotkey not working as obviously, so it always necessary to make sure RF2 have focus while racing).

    Another significant hidden optimization is to turn off Monitor Auto Replay in player.json as well. This option, when turned on (by default), will cause 1-2s screen freeze every time you hit DRIVE button, due to game trying to constantly switching between Live & replay mode automatically. And those 1-2s freeze time will quickly add up, which you can easily lose a few minutes for a few practice sessions.
     
    Last edited: Oct 13, 2022
    makan, DanRZ, Capeta and 1 other person like this.
  7. Trevor

    Trevor Registered

    Joined:
    Oct 6, 2022
    Messages:
    18
    Likes Received:
    16
    Yes, I am. I believe that is the only way for any overlays to work and that fullscreen would prevent you from setting an overlay in front of RF2.
     
  8. Trevor

    Trevor Registered

    Joined:
    Oct 6, 2022
    Messages:
    18
    Likes Received:
    16
    I had no idea about those two adjustments, excellent improvements! Thanks for the input and thanks for the wonderful tool you’ve built.
     
    svictor likes this.
  9. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    Sorry, I just realized I posted a wrong option (however Pause if focus lost should be off too), it should be Inactive Sleep Time option in player.json, as this option will actually slow down game while not focused, change the value to -1 will disable it.
     
    Trevor likes this.
  10. Trevor

    Trevor Registered

    Joined:
    Oct 6, 2022
    Messages:
    18
    Likes Received:
    16
    Got it - I’m going to check those later today, thanks for the follow up.
     
  11. Alejandro Diaz Reina

    Alejandro Diaz Reina Registered

    Joined:
    Jan 11, 2012
    Messages:
    40
    Likes Received:
    33
    it is possible to use it as an overlay for OBS scene?
     
  12. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    yes, just add a "window capture" source, then select corresponding "TinyPedal - XXXX" widget title and it will appear on screen. Note, when you adding "window capture", you will need to be on track or temporally disable "auto-hide", so that OBS can see the widget. Once you finished adding & repositioning widget on OBS screen, you can re-enable "auto-hide".

    Here is how it looks like:
    upload_2022-10-15_12-8-27.png
     
  13. Alejandro Diaz Reina

    Alejandro Diaz Reina Registered

    Joined:
    Jan 11, 2012
    Messages:
    40
    Likes Received:
    33
    Marvelous! Thanks for the tip!
     
  14. Alejandro Diaz Reina

    Alejandro Diaz Reina Registered

    Joined:
    Jan 11, 2012
    Messages:
    40
    Likes Received:
    33
    This is an amazing work that you have put here.
    Are there any updates coming? I'm thinking about Global Standings apart from the Relative.
    Is the only thing that I'm still using from SimHub...
     
    Last edited: Oct 18, 2022
    svictor, Rui Santos and DanRZ like this.
  15. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    thanks. leaderboard widget is planned, but it is not simple task and will have to wait some time, as I'm busy working on other mod project atm.
     
  16. Alejandro Diaz Reina

    Alejandro Diaz Reina Registered

    Joined:
    Jan 11, 2012
    Messages:
    40
    Likes Received:
    33
    Hey!
    Good to know that is on your scope at least.
    Obviously, no rush at all, you are doing this to contribute with the community, so, only if it is possible for you, at any time, will be great to have it.
    Cheers mate!
     
    svictor likes this.
  17. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    I found an issue with this. If you do a driver swap, going from driver to spectator, then leave the server, and re-join as driver, tinypedal shows the information of the person you swapped with, instead of your info. So it goes away if their car turns off, or they go back to the garage. Still happened on track switch as well.
     
    svictor likes this.
  18. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    935
    Likes Received:
    6,344
    Thanks.

    If I understand correctly, it happens with following steps:
    1. I must be the first guy driving the car.
    2. Then swap with team mate in pit in practice mode (as race mode doesn't allow none spectator to take a car).
    3. I quit server and join again as driver (which takes a new vehicle slot), and tinypedal still shows data from team mate.
    Currently I can't find someone to test. If anyone can confirm that this issue reproducible in v1.8.0, please let me know.

    Also, the code (sharedMemoryAPI) doesn't seem to have any issue with player index detection (which is used to determine whether a driver is yourself).

    I did have encountered once that sharedmemory plugin malfunctioned after a driver swap (for example, auto hide fails to work, and other data not shown, after I quit server and rejoin). The reason I suspect it was a sharedmemory plugin malfunctioning is because after restarting tinypedal multiple times, auto hide still fails and other data not shown (tinypedal only reads data), until I had restarted game, then all worked again.

    PS: my last driver swap test was done with v1.7.0 in practice mode on a server, and all worked fine for me and team mate who also used tinypedal.
     
    Last edited: Oct 27, 2022
    Corti likes this.
  19. Capeta

    Capeta Registered

    Joined:
    May 31, 2012
    Messages:
    268
    Likes Received:
    48
    Well, the way rF2 works ( :D ), after a stint, and if I have to drive the same car in the same race later on, I always reboot the computer.
    Never had issue with that process.
     
    svictor likes this.
  20. Flin Faraday

    Flin Faraday Registered

    Joined:
    Aug 10, 2022
    Messages:
    10
    Likes Received:
    0
    Any way to make TP work with Nordschleiffe 24hr (the series currently on LFM)? It seems to think it's the GP layout, so fuel figures etc are all wrong.
     

Share This Page