deepsidh9 / Live-Valorant-Overlay

An Overlay proof-of-concept Application for Valorant giving information in real-time about current match, spike and player status(dead/alive, weapons, ultimate points, shields etc.)
MIT License
102 stars 19 forks source link

Valorant Live Overlay

An Overlay proof-of-concept Application for Valorant giving information in real-time about current match, spike and player status(dead/alive, weapons, ultimate points, shields etc.)

Important Caveat:

Disclaimer

This is a fan-made project. Riot Games does not endorse, sponsor or affiliate with this project. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc.

Description

This project is a proof-of-concept that gets you live details of a match and populates a HTML file which can be used as an overlay in streaming apps such as OBS, Streamlabs OBS, Twitch Studio and XSplit which support "BrowserSource".

A small demo

Features

The following features are currently available:

  1. A Player's name, agent and alive/dead status

  2. A Player's bought shield (only none/half/full values)

  3. Both team's bought weapons (as seen from a spectator's perspective)

  4. Both teams' agents' current ultimate points (as seen from a spectator's perspective).

  5. Current Score

  1. Current Spike Status (True/False)

Installation

Prerequisites


pip install -r requirements.txt

You also need to install the latest build of Tesseract if you intend to use that instead of easyocr. It's totally up to you. You would need to make changes in the code as necessary, however OCR is only a small part of the app.

Usage

  1. Run Python Server

Change the working directory to app and run the following command to start the python server which will serve requests such as starting/stopping match processing and facilitate communication using Socket IO between different components (both the backend and the frontend).


python app.py
  1. Open Overlay
Using the Overlay in streaming apps

For using the overlay with OBS, add a "BrowserSource" and navigate to the overlay directly and open index.html . Set the width and height to 1920 and 1080/1200 (whichever resolution you are using) respectively (currently supported for this resolution only, explained further below) It should show dummy data for two teams.

  1. Instruct server to start match processing

When your match has just started, send a GET/POST request to http://127.0.0.1:4445/start_match or just open this link in the browser. It will start processing the match and the details will be reflected in the overlay.

  1. Stop Match Processing

When your match has ended, send a GET/POST request to http://127.0.0.1:4445/stop_match or just open this link in the browser. It will stop processing the match.

Get Match Details from the Server directly

You can make POST requests to http://127.0.0.1:4445/get_match_details to get the current match details.

To receive match details the moment they are updated, connect to Socket IO at http://127.0.0.1:4445/ (see app/components/get_live_frames.py to see how to connect) and listen on "new_event" event.

How does it work?

Match Processing Techniques

This app uses Image Processing using OpenCV and largely Template Matching to get information from a screenshot of the game.

Starting the match processing

What happens in the match processing

Populating the Overlay

The Overlay files (overlay/index.html+overlay/app.js) connect to the Python server via SocketIO.

The provided overlay files are a crude proof of concept of a working overlay.

Developing your own overlay

Feel free to develop your own overlay using the data received from the server.

How can I make it work for other resolutions?

For now the values for 1920x1080 or 1920x1200 are hardcoded.

You can compare both the branches to see what changes have to be made in order to make it work for other resolutions.

How can I make it work for getting the other team's information?

This is only relevant for the 1920x1200 resolution as the modules only process the top part of the scoreboard for that resolution. This functionality has been completed for the 1920x1080 resolution.

Possible Future Updates

Credits

The players' information retrieval method is inspired by the wonderful work done by isaacKenyon's VRY and colinhartigan's fork.

Contact

If you'd like to contact me regarding this application (for removal or any other purpose), feel free to email me or reach out on Discord - (Deep#8700).