Skip to content

KChadwick96/rFactor-2-Overlay

Repository files navigation

rFactor 2 Overlay

Ninja Labs   rFactor 2

Built using Angular 7. This app uses an rFactor 2 REST API to fetch session info and provide a stream overlay. It currently uses an unreleased REST API client so breaking changes are likely once fully released.

Overlay

Stream Setup

This has only been tested with OBS. To use other streaming software, you'll need to find a way to overlay a web page in your stream. The following instructions assume you already have OBS installed.

OBS

  1. Download and follow the install instructions for the OBS Browser Plugin here (This lets us add a web page as a source in OBS)
  2. In OBS, add a new source and select BrowserSource.
  3. Right click on the source and select Properties
  4. Set the following

Build Overlay

  • To build, simply run npm run build (This will create a dist folder with all the compiled files)
  • Create a folder called webdev inside your rFactor 2 install
  • Move the compiled files to the webdev folder

rFactor 2

Currently, rFactor does not expose the REST API needed for the overlay to work.

Copy the net.rfactor2.webdev.jar plugin in this repo in to your Bin/Bundles within your rFactor 2 install. This will expose session data to the overlay and creates a webserver that serves the webdev folder mentioned above.

Development Setup

Prerequisites

You must have NodeJS and Angular CLI installed on your machine. Run node -v and npm -v to make sure this is the case. You can install a Node LTS version here

Clone the repo and go to the project folder e.g. cd Documents/Projects/rfactor-2-overlay Then run the following commands

npm install

License

MIT