threecarbonalkane Posted April 29, 2019 Report Share Posted April 29, 2019 Is it possible to connect to a live game and subscribe to updates to the game state? I'm trying to achieve something similar to what you can do with Dota 2/CSGO's "game state integration", which allows third-parties to have a server they can connect to and receive updates about the game. From there, you can set up a client that connects to the server and parses out all the information (much like this for Dota 2). The primary use cases are typically for custom broadcast effects that react to gameplay or keeping track of stats in real time. Quote Link to comment Share on other sites More sharing options...
Stan` Posted April 29, 2019 Report Share Posted April 29, 2019 12 minutes ago, threecarbonalkane said: Is it possible to connect to a live game and subscribe to updates to the game state? I'm trying to achieve something similar to what you can do with Dota 2/CSGO's "game state integration", which allows third-parties to have a server they can connect to and receive updates about the game. From there, you can set up a client that connects to the server and parses out all the information (much like this for Dota 2). The primary use cases are typically for custom broadcast effects that react to gameplay or keeping track of stats in real time. Well you can connect as an observer to the games, and you will compute the game in real time. You won't get a simple json though, since you have to compute the whole game state to get that kind of data. Also not everyone will let you monitor their games. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 29, 2019 Report Share Posted April 29, 2019 (edited) If you are fine with being annoying to the host, you can recieve a binary serialization of the game. Which you can do periodically. From what I have read, you only need to deserialize the JS stattracker component. Once you are a connected client, the server won’t let the game proceed until you compute the game as well. (Or pretend to). So being in the game itself doesn’t seem to be what you want. The game updates sent to the lobby also contain some data. Which would be easier and more friendly to the host. Edited April 29, 2019 by Guest Quote Link to comment Share on other sites More sharing options...
threecarbonalkane Posted April 29, 2019 Author Report Share Posted April 29, 2019 Thanks for the replies. Quote Once you are a connected client, the server won’t let the game proceed until you compute the game as well. (Or pretend to). So being in the game itself doesn’t seem to be what you want. I think the simplest implementation would be utilize the work the client is already doing to parse the state, then just "echo" it to localhost for another process to consume all that info. This would limit querying to players and spectators (rather than allowing anyone with the host IP to ping the server). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.