Git Product home page Git Product logo

csgo-react-hud's Introduction

LEXOGRINE HUD

Logo

Powered by « Lexogrine HUD Manager »

Lexogrine HUD

Fullfledged example of the React HUD made for HUD Manager. It has:

  • Custom actions
  • Keybinds
  • Killfeed
  • Player cam feed
  • Custom Radar

Keybinds:

Left Alt + S

Makes radar smaller by 20px;

Left Alt + B

Makes radar bigger by 20px;

Left Alt + T

Shows trivia box

Left Alt + M

Toggles upcoming match box

Left Alt + P

Toggles player preview

Left Alt + C

Toggles camera feed

Left Ctrl + B

Make radar invisible

Panel

Trivia settings

Field Description
Trivia title Text
Trivia content Text

Display settings

Field Description
Left/right box's title Text
Left/right box's title Text
Left/right box's image logo Image file

Example settings

Preview of HUDs settings

Preview

Preview of HUDs panel in action

Download

To download it just click here: DOWNLOAD HUD

Instruction

Setting up

Fork this repo, clone it, and then run npm install and npm start. HUD should start on the 3500 port. For this to work have HUD Manager opened so it will pass CS:GO data to the HUD.

Identifying HUD

In /public directory edit hud.json so it fits you - fill HUD's name, author, version, specify the radar and killfeed functionalities. At the end replace the thumb.png with your icon :)

Building & distributing

To build version to distribute and move around, in the root directory run npm run pack. It will create the zip file for distribution. Now you can just drag and drop this file into the HUD Managers upload area.

Signing

To create Signed HUD to prevent at least from modyfing compiled Javascript files run npm run sign. It's the same as npm run pack command but with additional step of signing .js and .css files and hud.json.

File structure

The HUD is seperated into two parts - the API part, that connects to the HUD Manager API and communicate with it: src/App.tsx file and src/api directory. Usually, you don't want to play with it, so the whole runs without a problem. The second part is the render part - src/HUD, src/fonts and src/assets are the directories you want to modify. In the src/HUD each element of the HUD is seperated into its own folder. Styles are kept in the src/HUD/styles. Names are quite self-explanatory, and to modify style of the element you should just find the styling by the file and class name.

panel.json API

To get the incoming data from the HUD Manager, let's take a look at the src/HUD/SideBoxes/SideBox.tsx componentDidMount() method:

import {configs} from  './../../App';
...
configs.onChange((data:any) => {
	if(!data) return;
	
	const  display = data.display_settings;
	
	if(!display) return;
	
	if(display[`${this.props.side}_title`]){
		this.setState({title:display[`${this.props.side}_title`]})
	}
	if(display[`${this.props.side}_subtitle`]){
		this.setState({subtitle:display[`${this.props.side}_subtitle`]})
	}
	if(display[`${this.props.side}_image`]){
		this.setState({image:display[`${this.props.side}_image`]})
	}
});

To retrieve incoming data, you should just import configs object and then listen for the changes with onChange method. Usually you want to check for the specific data, as in the callback it will always serve the full form from the Manager. However it looks different in the case of action input. In this case, let's look at the src/HUD/Trivia/Trivia.tsx:

import {configs, actions} from  './../../App';
...
actions.on("triviaState", (state: any) => {
	this.setState({show:  state === "show"})
});

For the action input we need to import the actions object and create listener with the parameter on it.

keybinds.json API

Keybinds API works in very similiar to panel.json action API. One more time the example will be from src/HUD/Trivia/Trivia.tsx:

import {configs, actions} from  './../../App';
...
actions.on("toggleTrivia", () => {
	this.setState({show: !this.state.show})
});

Keybinds listener works on the same object as action input, in this case however there are no parameter to retrieve.

Killfeed

Because our csgogsi has the ability to process input from HLAE's MIRV, listening for kills is very easy. We can see than in src/HUD/Killfeed/Killfeed.tsx:

componentDidMount() {
	GSI.on("kill", kill  => {
		this.addKill(kill);
	});
}

The Killfeed component basically just keeps kills in the state during the round, and after the round it cleans the state. Kills have CSS animation, that makes them gently show, and after a few seconds disappear, the experience is very smooth. You can fiddle with the styling in the killfeed.css This killfeed detects who killed whom, if there was an assist (flash assist as well), used weapon, headshot and wallbang.

Radar

Radar is custom React-based component, made by Hubert Walczak, and is easily editable from css.

csgo-react-hud's People

Contributors

dependabot[bot] avatar osztenkurden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

csgo-react-hud's Issues

Loss bonus error

Loss bonus go over 3400 instead of being capped.

Thank you Nanshan for reminding me 👍

Some feedbacks, and problems about disabling HUD features, and alignments

Hi guys! First of all, really a great work!

I am using the free version, and I tried it out on some official Matchmaking live matches.

I have couple of feedbacks/problems:

  1. I have disabled the custom radar in the HUD settings, but it's still shown. I know I can hide it with CTRL+B, but it would be nice if I don't enable, it wouldn't even shown up.
  2. I have also disabled (and not used) the custom killfeed, but the "x planted the bomb" / "y defused the bomb" messages are still shown, and interferes with the native game killfeed. Maybe this is also a problem with the custom killfeed as well? How could I disable these custom messages?
    image
  3. Can't hide only the extra boxes (left and right display boxes), because if I hide them, it also hides the utility level boxes and other stats boxes (loss bonus, team money, equipment value), but I want them.
  4. If you don't setup a Match, "Best of 0" will be shown under the timer. It would be nice, to hide that row, if there is no Match setup. Or a no Match would be atomically a BO1, but there are also some unnecessary design changes even with BO1, which is not needed; black bar under map, 1-1 win indicator under teamname.
    image
  5. The win panel is sometimes overlapping with the native killfeed. Maybe this also a problem with the custom killfeed?
    image
  6. The radar (and the custom killfeed) is misaligned with the rest of the HUD elements:
    image
  7. And also dead players on the custom map doesn't look like X's, as seen in other screenshots from boltobserv. And overlapping with live players.

HUD "lagging" when switching player

Hello Lexogrine!

We are a small esports association, in a small town, that uses Lexogrine and the React HUD to stream our matches.

So far we have been loving the features, but in the last 2 updates, there have been various problems for us.

  1. We have had problems with the HUD snapping to the game in multiple instances. We have fixed it sometimes by closing steam, but the error occurs again in some time.
  2. In the newest update, we have had problems with "lag" when switching between players, and we have so far not found a fix to this. It takes a lot of time to load the correct player, and we have tried multiple things to fix this (within our limit of knowledge of course).

Have you ever tried or heard about this problem, or knows how to fix it? We can provide a video of it if needed.

Thank you for a great program and for the help in advance!

Team-names and scores are not switched after first half

Hi guys, first I want to say that I am really appreciated for your amazing work!

I have used your HUD for my school tournament and it is very beautiful. But i have noticed that after first half, the team-names displayed on top of the HUD were not switch, and maybe so does the score as well, I didn't remember specifically. And then i had to press on the Reversed Side button, not by 1 but 2 times in order to make things back to normal.

Can you please fix that problem by adding a method that automatically switch team-names and scores? Thank you very much.

Zues

If somebody buys a Zeus, HUD doesn't show the main weapon. (Player: Velichayshiy)

And maybe HUD needs to limit the characters in the nickname (Player: Коляся "Железный человек")

20201026215803_1

CSGO React HUD doesn't work after newest update

Greetings Lexogrine!

I've been using my edited version of CSGO React HUD in Lexogrine HUD manager with my team for awhile, and it's been working like a charm. Today I tried to change couple of things in the HUD but when I did npm start, it started with no errors but didn't show in Lexogrine HUD manager HUDs tab at all.

So I cloned newest version of this React HUD. After successful npm install, I started HUD with npm start and it started with no errors, with message pasted bellow.

PS C:\Users\User\Desktop\csgo-react-hud> npm start

> [email protected] start C:\Users\User\Desktop\csgo-react-hud
> craco start

Compiled successfully!

You can now view lexogrine_hud in the browser.

  Local:            http://localhost:3500/dev
  On Your Network:  http://192.168.1.7:3500/dev

Note that the development build is not optimized.
To create a production build, use yarn build.

When HUD showed up in Lexogrine HUD manager named [DEV] Lexogrine HUD, I opened it in browser and nothing, just a white screen. When I run the HUD as an instance of Lexogrine HUD manager, nothing shows up, not even a Lexogrine watermark. I've tried both running CSGO itself and running test data, nothing works.


I tried to inspect the page, and <iframe> that should have the HUD itself is empty (source code of the page here).

Tag src links to src="/dev/?port=1349". When I visit that page, I get this error

{"expected":["http://192.168.1.7:1349/dev","http://***.**.***.**:1349/dev"]} // Numbers with * are my public IP address

On the other side, when I download latest release of this HUD, it works just fine.


What I've done:

  • Updated to the latest version of Lexogrine HUD manager v1.10.0
  • Cloned latest version of CSGO React HUD v1.9.0
  • Installed Node.js and npm modules
  • Added Steam API key in Lexogrine HUD Manager
  • Loaded CGI file
  • Loaded Configs
  • Added two teams and a Live match between them

Feedback Submission - Not An Actual Issue

Apologies for clogging up your inbox. I just wanted to let ya'll know that this is great.

By far, the best UI/UX that I've seen, for any type of broadcasting software.

Who know's maybe Valve will buy it off you 💯 🥇 👍

Good luck!

Adding prettier config

Did you thought adding a prettier config to ensure code style consitency?
I you don't mind I would create a PR with a config and reformated code base.

HUD switched scores at the end of the match

Last round, 3-15 to Budapest Five team. After it was clear that Budapest Five team will win the match, players started to disconnect, and then suddenly the HUD switched sides, indicating the wrong team to be the winner. Before the end it switched back to normal, but it was confusing.

Video:
https://www.twitch.tv/videos/818649500?t=5h23m46s
Watch for the scores in the top (don't mind the videos title).

Update:
New video, because the other is expired, or deleted.
https://www.twitch.tv/videos/1051838196?t=03h32m46s
(Source: TyroN from Lexogrine Discord server)

BOT support

I have tried the HUD in an official Matchmaking, where there was a BOT:
image

The BOT was recognized as a valid player, with SteamID64:
image

If you want to know who is that guy with that SteamID64: https://steamcommunity.com/id/greg/
He is a known VALVE Employee, with a steamID number 5: STEAM_0:0:5 (!!!)

How is that possible? :)

Still, a BOT support would be nice, to display the BOT names with the BOT prefix, and use a default avatar.

Binds stop working.

Lexogrine HUD (1.2.0)
Can't make radar smaller or bigger.

Trivial and toggle radar are working

Replace Anubis radar image with changes

Anubis had a larger update some time ago, which changed some boxes and hallways. These changes are not currently reflected in the radar of Anubis in this repo.

Pause info

Your HUD is realy greate, but it would be cool if you add information about pause.
I was testing your HUD in demo and mutchmaking spectating and there are no information which team takes pause. I think, that it's easy for you to add this think :)

Bind for players & match overview

Is there any binds for toggle on and toggle off show player preview/show upcoming match?

It's going to be hard to toggle it with minimize the game...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.