-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Story: Twitch Extension #20
Comments
hey, great job on the mod+twitch integration! I'm probably going to use bits of your mod for my twitch integration, so i was wondering if you need help getting the extension API working, assuming you're still working on it? Also, I was wondering if you looked into the official c# extension https://github.com/TwitchLib/TwitchLib.Extension? It's made for4.5.2 and core, so not as useful for unity, but parts of it could be reused such as auth? |
I have a PoC working for the extension - it hasn't been checked in but it's a Typescript Vue.js app that simply updates it's state based on the Twitch extension.js data it receives and then actual "writes" happen via calls to an API Gateway that's auth'd to the extensions authorization token.
Haven't looked at it! Mainly because I wasn't thinking of writing the backend in C#. My backend API is written in Typescript and Twitch's Auth is pretty standard OAuth 2.0 - so I'm just using common modules from the NPM ecosystem and it's worked out fairly well. Overall, progress is slow simply due to other priorities/projects I have (and let's not forget my actual day job 😄 ). At this point I just need to come up with a solid API schema between the game and backend as well as between the backend and the extension. After that it's doing a final "glueing" of them together, testing, and polishing the UI. The current mod's hook points make it super simple to hook everything up into the game code - so I don't expect much more code effort on the mod side of things... I'm curious: what will your mod integration will be covering? If this extension that I'm working on is successful I have wanted to make another one that simply adds a ton of extra metadata over top the gameplay for new people to learn about what's going on. For example, if someone picks up an item, you can hover your mouse over it in the Twitch player and it'll do a popup with the items details as well as any stats (like when you hold Tab and hover over the item in game). You could do so much with an extension like that..... |
Yeah thats what im working on. A mod that reads the player's items/equipment, and then passes it to the extension to display in a component or overlay. I was just looking for an interesting project to work on related to Twitch and Unity, ended up falling down a rabbit hole of modding + extension haha. My initial idea was to have the backend written in c# as part of the RoR2 mod. So the mod would parse the inventory, save it as json and push up to the player's extension to update the state. Not sure how viable that is, i was investigating it just now and thats why i popped a question here in your repo :) |
That's completely viable! And fairly easy to do with the MMHOOK's for mod development here.
So since the extension will probably be read-only you might be able to get away with no backend and have the game client push to the extensions PubSub subscriptions. That will make the architecture very simple and you won't need to pay for infrastructure.
Feel free to implement it - again, I don't know when I'll have time to work on that idea and I welcome more Twitch integrations from others; so go for it! If you need any help along the way feel free to reach out. |
Yep! I have an early POC to confirm it works, and it does. Just trying to figure out the Twitch side of things now, definitely more complex hahaha! I'll first roll with a a component extension, but eventually i want to have it running as a video overlay with hover over effect on items, equipment and skills :)
Yeah that's exactly what i was thinking! I'm still trying to figure out how to do that. From what I gather, to update the extension i have to send the broadcast websocket message with the content. Also, apparently we're constrained by 5kb limit per message, hopefully that's enough for a bunch of strings in a json (item name, count and hopefully description as well).
I'll be using your implementation as a base, so hopefully i'll be able to contribute back once i have it working! I'll ping you with the repo once i have it set up, in case you're interested! |
The extension has been put on an indefinite hiatus due to me not having a lot of time outside my work/life to commit to finishing it. If development for the extension starts up again I'll update this issue accordingly. |
Issue tracking the greater work towards integrating this mod with a Twitch Extension.
The text was updated successfully, but these errors were encountered: