[CSGO] Live game data (Open source)
https://camo.githubusercontent.com/6...3331342e676966https://camo.githubusercontent.com/8...6266392e676966 So I made this simple example which reflects some of the ingame events such as positions, kills, smokes for the de_dust map. Feel free to further develop, or use this for inspiration for your own projects. If you have any questions feel free to contact me here or on github.If anybody have some optimization ideérs, feel free to let me know! Since this, was one of the only ways I could see, how to reflect the ingame data and control it on a webpage the way you choose to. Hope some of you find some inspiration from this or can use part of it :gyar: The project is achieved with Javascript, JQuery, Node.js, MySQL and sourcemod. Github link for the project https://github.com/jonaslagoni/csgoLiveServer Updating the position data for players First lets break down the timer used to control the interval for players positions. Ill start off with the sourcemod plugin located here. Code:
public Action Timer_player_positions(Handle timer){Code:
//Using setInterval as a timer to get the data each 100msCode:
//On a single position updateCode:
function getPosX(pos_x){ |
Re: [CSGO] Live game data (Open source)
Great job. This looks awesome.
|
Re: [CSGO] Live game data (Open source)
Pretty much nice!
|
Re: [CSGO] Live game data (Open source)
Thanks guys, appreciate it :up:
Since this is my first plugin for a CSGO server, I would love to get some feedback if you guys have any :) -Updated the post with a little run through how updating the position on the players work :) |
Re: [CSGO] Live game data (Open source)
Great! Thanks for share.
|
Re: [CSGO] Live game data (Open source)
Good job! Having the webserver poll a database seems like a bad idea. You could think of creating a socket and directly pushing the data from the game server to your node server.
I've done similar before in CSS, but with the browser connecting directly to the gameserver via websockets instead of a seperate server somewhere. The demo is still up here. I have no clue about javascript, so this never got somewhere - yours looks way more promising. The code is attached here. You could think of adding the view angle and health for a start! |
Re: [CSGO] Live game data (Open source)
Quote:
|
Re: [CSGO] Live game data (Open source)
Quote:
You could even start recording the packets into a file and let players watch past matches in their browser that way :) |
Re: [CSGO] Live game data (Open source)
Relaying the information from the game server to the node.js server right?
What I need is the direct connection from the game server to my node.js server which sends it to the clients. And that could be achieved by using websockets. |
Re: [CSGO] Live game data (Open source)
Quote:
https://forums.alliedmods.net/showthread.php?t=67640 |
| All times are GMT -4. The time now is 18:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.