besteon / Ironmon-Tracker

A Lua script for the Bizhawk/mGBA emulator compatible with Pokemon Fire Red, Leaf Green, Ruby, Sapphire, and Emerald that tracks relevant data for the IronMon challenge.
MIT License
123 stars 44 forks source link

Feature Request: Twitch Extension #340

Open jackjack178 opened 1 year ago

jackjack178 commented 1 year ago

Hi,

Not sure if anyone has already requested this, but I'm wondering if you could add support for a Twitch extension so users could mouse over abilities/moves on the stream and get info about them. Maybe even a list of the heals in the bag, etc.

An example of a similar extension would be the Hearthstone Deck Tracker extension: https://github.com/HearthSim/twitch-hdt-ebs And a stream featuring it (there are many) as an example would be: twitch.tv/nl_kripp

I'm not sure how many people are working on the tracker or how possible it would for you/your team, but it would definitely be very cool!

Thanks for the dope tracker regardless!

Fellshadow commented 1 year ago

Certainly an interesting idea for sure, I agree it'd be cool to see. I'm unfamiliar with how twitch extensions work but from a brief look at that Hearthstone Deck Tracker one there's bits and pieces of things i recognise. Going to list out my initial thoughts on it for anyone else reading this if they're interested so apologies for the big response lmao

Stuff like seeing ability/move info I imagine wouldn't be too bad, as that's static data that could just be contained within the extension code. Would need to figure out how to get "on-hover" functionality to reliably work given the wide range of stream layouts people have. A basic "hover to see what this ability does" type of extension would probably be possible yeah (not much different to y'know, googling it in a separate tab but having it right there is convenient and kinda cool)

However dynamic data like seeing the full list of heals in bag would be more difficult as that would require having the tracker provide that information from the streamer's pc through an api to the extension somehow (not really sure how to do that off the top of my head, but would definitely get into the realm of authorisation headers/tokens and all that which you then need to be wary of security regarding logins and tokens and stuff, though I guess twitch probably provides ways to handle that for you at least on the extension's end)

Depending on how much is involved and what-not, the extension itself would probably be better off being in its own standalone repo separate to the tracker files themselves (with the tracker only really having anything needed to provide data to the extension if that route is explored), ideally an extension that works on both this tracker and the NDS tracker of course

Can't speak for the devs as a whole, but might be something I look into sometime out of curiosity to play about with. All my time and energy has been sucked up by life/work though the past while so I can't promise anything 💀

UTDZac commented 1 year ago

We recently adding the ability for any developer to create Custom Extensions to be used with the Ironmon Tracker. While there isn't exactly an API or other docs for the Tracker available, the support is there and sample Extensions have been made. This is to say that it would be possible to add customizations to the Tracker if anyone wants to.

As for this integration with Twitch, this one is a toughy. I believe it's possible to integrate with twitch itself, though I only briefly explored how to communicate and haven't actually built anything to show for it.

The biggest problem, and the main thing I don't know how to solve, is how does it work on Twitch's end? When you are viewing a stream that has the Tracker, what do you expect to happen? I don't know how the Tracker could know where the streamer has put the Tracker on their stream layout. I've seen it in every corner of the screen, and even split in half. So actually clicking on the Twitch stream to guess where the Tracker is seems like a nightmare. Maybe its not, but I've personally never developed anything for Twitch integration like this.

I do agree that something here is likely possible, it would just require some research on how to implement it and how to make it such that it's actually usable. I'm not entirely sure myself how to go about this. I don't have plans to add something like this extension request in the near future, but I'll leave this Issue open in the event someone wants to try and tackle it, and/or we want to explore how to implement such a feature.