DiabloRun / DiabloInterface

Diablo 2 Interface for Streamers/Speedrunners
MIT License
121 stars 28 forks source link

Web socket client to push data to an existing server #17

Closed beastwick closed 4 years ago

beastwick commented 8 years ago

Hi, I actually was working on a similar project about a year ago, but my skill set wasn't adequate enough to work with live game data. I was able to develop a program that read the save file periodically, but got stuck on parsing item data.

I just spent some time working around Underbent's BH Maphack for Slash Diablo and I've learned a great deal. I was trying to implement a web socket client that forwarded data to a specified web server where people could view stats in real time. Implementing that in C++ has been unfortunately more difficult than I had hoped for, but C# has some more robust libraries that seem easier to use.

I'd like to implement this feature into your program. I see that you have a server stream for item data, which exports in JSON data. I think the next step would be to use web sockets and allow viewers to connect via their browser to a server and see data update in real time. I'm going to begin implementing this and I think it could add to satisfying the goals of the program. I know a lot of effort has been put into developing a nice GUI that can be shown alongside the game in a stream, but I think this is the next logical approach since item and skill data is going to become very difficult to show well visibly on screen, especially if the streamer only has one screen to place apps.

feyd commented 8 years ago

Just to clarify:

I am not sure I see the benefit entirely or think that a lot of people would open it up while watching a run, but maybe they would.

Implementing a sending service inside DiabloInterface, and a receiving WebService should only take 30 minutes or so though.

beastwick commented 8 years ago

Yes that is correct. I believe this approach can complement the chat bot. The chat bot I hope also privately messages or whispers people, otherwise the chat will turn into a spam mess. I believe people will like this approach as many people who stream Diablo 3 link up their armory a RESTful service Blizzard provides. People do open an additional tab to view them. Having similar functionality for Diablo 2 would be quite nice.

Zutatensuppe commented 4 years ago

implemented with #52 (ty to @OverseerShenk )