rFactor2_vk_hud/README.md

50 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

# Vulkan rFactor2 HUD
This project is an attempt to render custom HUD elements for rFactor2 by being a Vulkan layer.
# Current state
2023-01-18 11:00:30 +00:00
I would consider the following elements as working:
2023-01-20 05:11:43 +00:00
* Leader Board
* Delta Board (shows intervals between driver next to you (2 before and 2 behind you))
2023-01-18 11:00:30 +00:00
* Radar
* Pedals
# How to enable
2023-01-18 11:00:30 +00:00
### Archlinux based
2023-01-23 19:13:14 +00:00
Simply use the PKGBUILD from the resources/pkgbuild directory ([How to use it](https://wiki.archlinux.org/title/Makepkg))
2023-01-18 11:00:30 +00:00
### Manual installation
1) Build this repository `cargo build --release`
2) Change the path where the `libvk_layer_rs.so` is located (`library_path` parameter in the rFactorOverlay.json file)
3) Put the rFactorOverlay.json into a layer directory ([layer directories](https://vulkan.lunarg.com/doc/view/1.3.216.0/mac/loader_and_layer_interface.html#user-content-linux-layer-discovery))
---
* Add `RFACTOR_HUD=1` to steam launch command (example: `RFACTOR_HUD=1 %command%`)
2023-01-16 16:08:57 +00:00
A config file is generated the first time you start it at: `$HOME/.config/rFactorHUD/config.json`
2023-01-18 11:00:30 +00:00
### Requirement
You need to have rFactor2 memory plugin shared file enabled ([rF2SharedMemoryMapPlugin_Wine](https://github.com/schlegp/rF2SharedMemoryMapPlugin_Wine))
2023-01-20 22:21:58 +00:00
### Debugging
2023-01-23 19:13:14 +00:00
Add `RFACTOR_HUD_LOG=1` to the launch options of the game. Then a file log file will be created (`$HOME/rf2_vk_hud.log`). The logs may seem super random and they are super random, since I didn't have (or took) the time to unify my logging output.
2023-01-20 22:21:58 +00:00
I would not recommend to activate logging while playing a longer session, it can get quite big (about 15 minutes are roundabout 1 million lines).
# Resources
## Vulkan Layer
* [Sample Layer](https://github.com/baldurk/sample_layer)
* [Brief guide to Vulkan layers (Renderdoc)](https://renderdoc.org/vulkan-layer-guide.html)
* [Mangohud](https://github.com/flightlessmango/MangoHud)
* [Lunarg Guide](https://vulkan.lunarg.com/doc/view/1.3.216.0/mac/loader_and_layer_interface.html#user-content-layer-manifest-file-format)
## rFactor2 Shared Memory
* [rFactor 2 Modding Resources](https://www.studio-397.com/modding-resources/)
* [rF2SharedMemoryMapPlugin](https://github.com/TheIronWolfModding/rF2SharedMemoryMapPlugin)
* [rF2SharedMemoryMapPlugin_Wine](https://github.com/schlegp/rF2SharedMemoryMapPlugin_Wine)
2023-01-16 02:56:10 +00:00
* [CrewChief](https://gitlab.com/mr_belowski/CrewChiefV4/-/tree/master/CrewChiefV4)
* [OpenSimHud](https://github.com/schlegp/OpenSimHud)