HUD uHUD - WebHud

Discussion in 'Community Workshop' started by sefi, Nov 6, 2023.

  1. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Made it for myself but You might like it. It is my first program in C so may works not perfect or not run.

    https://github.com/sefiru/r3eWebhud

    Pros:
    • No-delay stating lights.
    • ~100fps delta and radar.
    • Radar is car size accurate.
    • Using ~ten times less system resources than OtterHud
    • Portable
    • You can modify the HTML yourself to create your own view
    • ABS/Grip graphs for each wheel and input graphs
    Cons:
    • Looks ugly
    • Less functionally compared to other HUDs
    How it looks for example:
    [​IMG]
    [​IMG]
     
    • Like Like x 5
    Last edited: Sep 19, 2024
  2. [weichenschleicher]

    [weichenschleicher] Member

    Joined:
    May 19, 2019
    Ratings:
    +13 / 0 / -0
    you dont many functions,
    but you can make a beautiful looking livetimings, and that would enough [for me] :)
     
  3. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    im bad at UI development, its made with html/css, so you can help with it if can/want
     
    • Like Like x 1
  4. [weichenschleicher]

    [weichenschleicher] Member

    Joined:
    May 19, 2019
    Ratings:
    +13 / 0 / -0
    I'm not a programmer,
    so I dont know how it works,
    my knowledge is nearly so big as a booger :)

    But I have photoshop and can create some tiny graphics when I have the time. The question is only which format .png, jpeg or. bmp and how big the needed parts and which Series.
     
  5. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    we can try
    .bmp is good, try drawing it the size you want to see on the screen, and add font names and text sizes
    for faster communication, feel free to add me on discord - ‘sefianti’
     
  6. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    new update: inputs graph is added
    [​IMG]
     
    • Like Like x 1
  7. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    New Update

    Added a "skin system". Now, you can customize the HUD view with your own style using HTML/CSS and share it with your friends and the community.

    New "standings" table in a Porsche style, designed by [weichenschleicher].
     
  8. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Big update, fixed a lot of bugs and added ABS/Grip graph for each wheel.

    Instructions on how to use the new features are available on GitHub

    [​IMG]
     
    • Like Like x 2
  9. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    new update: bug fixes, opponent penalties now show on the relative table, also a new lateral slip graph that displays with a white line the front axle, a red line the rear axle, and oversteer/understeer with a background color of the graph red/green (experimental, will be improved later)

    if you are using a previous version, delete settings.txt and index.html before starting the new version
     
    • Like Like x 3
  10. Wretched Rascal

    Wretched Rascal New Member

    Joined:
    Aug 5, 2021
    Ratings:
    +2 / 0 / -0
    This is really really good! As a VR racer I prefer to use as little HUD as possible, but in multi class qualifying sessions I like to know who is in front and behind, and who is on a hot lap and who botched theirs, and their ranking, and so find the relative really useful.

    But I think I found a bug which prevents the leaderboard, lights, and input percentages from being switched off, and maybe prevents dev mode working…

    The default index.html is created with a typo in the javascript: there is a “do” missing from one of the “document.querySelectors”s:

    if ( !slipGraphSetts )
    cument.querySelector(\".chartSlipHider\").classList.add('maxHide');


    if you search web.c for “\ncument” you’ll see what I mean!

    if you verify it’s a bug and decide to fix it, could I also request a new feature?

    It would be awesome to be able to bind a key to toggle the display of everything? While I rely on the relative in qualifying, it is a little distracting during a race so would like to be able to hide it.

    Thanks!
     
  11. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Thanks for the report! For now you can fix it yourself by editing index.html, and it should work.

    How would you like the toggle to behave — one button to hide/show everything, or separate buttons for specific elements?
     
  12. Wretched Rascal

    Wretched Rascal New Member

    Joined:
    Aug 5, 2021
    Ratings:
    +2 / 0 / -0
    Being able to toggle things independently would be very useful, but you would soon run out of keys to bind to and could end up clashing with the game's.

    So I was thinking about grouping things into blocks and being able to hide and show them with a single keypress. So in my case I'd bind "r" to the relative, and "t" to the best/lap/leader lap times so both these things could be toggled independently.

    But then I started wondering how to do the settings for this, and that's when it started getting complicated. Perhaps settings.txt could continue to use 1 and 0 for non-hideable elements, and "r" or "t" to bind those elements to each letter?

    eg:

    last lap = "t"
    best lap = 1
    best lap leader = "t"
    delta = "t"
    radar = 0
    all time best table = "t"
    relative table = "r"

    For now I have worked out the html/javascript to show and hide the relative which was my main goal. Now I am going to see what else I can achieve... being able to edit the html is definitely very useful. Thanks again for creating and sharing this!
     
  13. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Try this html: https://github.com/sefiru/hudhtml/blob/main/index.html

    At the end of the file you can find the button settings. If it works well, I’ll leave it as it is for now and wait for the Raceroom API update, then add the changes into the HUD.
     
  14. Wretched Rascal

    Wretched Rascal New Member

    Joined:
    Aug 5, 2021
    Ratings:
    +2 / 0 / -0
    As it stands:brilliant, no changes required. Please feel free to stop reading here!

    But.... would it be possible to make it so I could associate the same key to a few different toggles? Might be a bit of programmer effort, so no worries if not. And if you don't I think I can achieve thesame thingby grouping those elements into a <div> and hiding that, OR just changing thehider they use.

    A couple of clashing key binds: "c" is usually used for chat and so anyone trying to hide the Porsche table will be met with an unpredicatble outcome. And I think "r" by default goes to the instant reply which I already unbound years ago so don't remember if it would be race breaking if used in multplayer?

    I strongly suspect with the API update it will finally be game over for Otterhud. I understand flatscreen enthusaists are more than happy with reHUD but in VR yours is looking like the best alternative!
     
  15. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Try the updated html. Also add groups for keys - in "keyMap" object just assign key what you need and group elements to toggle them together.
     
  16. Wretched Rascal

    Wretched Rascal New Member

    Joined:
    Aug 5, 2021
    Ratings:
    +2 / 0 / -0
    Absolutely perfect! Thank you once again
     
  17. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Update for a compatibility with the new game api and also:

    Reworked tyre widget.
    Add transparency in widget tables.
    Add a keybinding to save element positions (toggle_element_reposition, works same as top-right corner click) and reset them. (This functionality is temporary and not very user-friendly, since it is set in the .html file, as shown in the attached screenshot.) Feel free to ask if something is not clear, probably its need to write detailed instructions how to use it.

    You can only replace the .exe if you are not interested in the new changes in the .html, if you do need the changes, delete the .html before running .exe.
    And need to delete "brake_pressure_folder/cars_id.txt" and "brake_pressure_folder/classes_id.txt"

    Not part of update, but confirm the slip graph shows understeer/oversteer quite accurately.

    Big thanks to Martin Petermann for testing and suggestions.
     

    Attached Files:

    • Wonderful Wonderful x 1
    Last edited: Sep 25, 2025
  18. NL-Jos

    NL-Jos Well-Known Member

    Joined:
    Jun 5, 2015
    Ratings:
    +190 / 0 / -0
    To use in VR?
     
  19. sefi

    sefi Member

    Joined:
    Nov 25, 2022
    Ratings:
    +18 / 0 / -0
    Tested in VR - works
     
  20. NL-Jos

    NL-Jos Well-Known Member

    Joined:
    Jun 5, 2015
    Ratings:
    +190 / 0 / -0
    When you have time hopefully you can/wil maken an how to install it?