Twitch overlay: Integrated with Chat, Events, Camera and Scenes

1 favourites
From the Asset Store
Chat with smart animals using the OpenAi Chat GPT 3 API
  • About:

    I feel like that sometimes a person need many programs to set up a stream, so I wanted to create a overlay that handle much of these things, with a minimal setup up time and the possibility to change scenes based on events happening during the stream.

    I want to do this while I learn more about the usage of Construct 2. So I will be streaming parts of my development and efforts.

    Overlay features

    Scene change
    This will TRIGGER when one of the below events happens, and dont require you to interact
    Donation/Bits
    In this scene the donator will be featured on the screen with NAME and AMOUNT
    Raid/Host
    In this scene the amount of FOLLOWERS the user have, will battle againt the HOST amount
    Camera
    This will show the USER and will be SHOWN/HIDDEN as the scene demands
    Various
    At least 1 mini game / Voice commands / START+END+AFK events

    Change log

    0.0.0.1:

    • Learning about Twitch API
    • Can now READ/WRITE to chat using WEBSOCKET
    • I can now get information using API v5, on KRAKEN
    • HELIX still evades me, and it dont want to read the client_ID
  • This is quite interesting. I've also been looking into integrating Twitch with Construct 2. So far, I've only managed to get it to read a channel, but cannot figure out how to recognize follows or subs (beyond reading notifications in the chat).

    Are you able to share any of your ideas or methods?

  • Hey AnD4D , ive been very busy with my new job and well life :D

    - Im sorry I dont really know how to make construct 2 read anything directly from twitch.

    - I used to get my info from text files, such as chat and make my overlay respond according to that.

    - Muxy for followers and all events (streamlabs can do the same)

    - Chatty for getting the chat into a file (used to be able to do it with restream and streamlab bot)

    I will however start working on this again and will learn more about it the following year :) hopefully more people want to learn about this so we can make it better

    This is quite interesting. I've also been looking into integrating Twitch with Construct 2. So far, I've only managed to get it to read a channel, but cannot figure out how to recognize follows or subs (beyond reading notifications in the chat).

    Are you able to share any of your ideas or methods?

  • AnD4D

    Hey :) mind showing me how you got it to read chat, more so to see how you did it compared to how I did it, could be interesting to share some ideas here ^^ we might both learn something from it.

    What I did was using the websocket:

    (websocket) connect -> url "wss://irc-ws.chat.twitch.tv/"

    (websocket) On connection open -> (websocket) send text "PASS "&MYoauth (to user or bot)

    (websocket) On connection open -> (websocket) send text "NICK "&MYnickname(or bot)

    (websocket) On connection open -> (websocket) send text "JOIN "&MYchannel (or a channel)

    then I have a way to decipher the chat and cut it up into pieces so I only show: USERNAME: MESSAGE

  • Yeah, that's pretty much exactly how I did it. Wasn't easy figuring out a way to get it to convert to JSON so I could then pick it apart in a dictionary or an array.

  • heh then you must have more experience with JSON, which mean that you also can connect with PUBSUB, which would give you the ability to LISTEN for events such as bits/donation/subs etc. even though this isnt what you were looking for precious, you might still find it interesting (if you havent read it already)

    dev.twitch.tv/docs/pubsub

    Yeah, that's pretty much exactly how I did it. Wasn't easy figuring out a way to get it to convert to JSON so I could then pick it apart in a dictionary or an array.

  • Actually, I couldn't quite figure that part out, but I had Twitch integrated with a Chatbot, which would post a notification upon follow or sub. I'd search for those words, then I could see when someone had donated by purely looking at the chat :)

  • hehe sounds like a good way to do it and sounds like how I do it too. For some of it though, I use MUXY for the events, since it stores the latest follower etc. so I can keep that information and still show it next stream, but that is only because I dont know how to save all my DATA locally yet ^^

    well I will let you know if I have some luck cracking up a "better" or other way to do these things.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The thing I'm stuck on now is grabbing the data from viewers.

    Typing in tmi.twitch.tv/group/user/and4d/chatters into a browser works fine... but when I try to feed it into AJAX nothing appears at all.

    Can't quite figure out why not.

    It's nice to know someone else is going down the same path I am.

  • Not sure I fully understand what you want to go with the data, but when I did the following:

    System -> On start of layout

    Ajax -> Request -> Url "tmi.twitch.tv/group/user/and4d/chatters"

    It loads the same information as the browser, isnt that what you want it to?

  • Really? That's odd... when I type it in, I either get a 404 message or nothing at all.

    https://1drv.ms/u/s!Am3CPIM7woZ9grMdEu3eWyEyGHniOA

  • mm well the only different between what you do, and what I do is the following:

    Preview browser = NW.js

    and

    URL = "https://tmi.twitch.tv/group/user/and4d/chatters"

    If I set it to chrome I get the same error(s) as you do ^^

  • Really? That's odd... when I type it in, I either get a 404 message or nothing at all.

    https://1drv.ms/u/s!Am3CPIM7woZ9grMdEu3eWyEyGHniOA

    Ashley is there a reason why this only appears to work with Preview browser = NW.js?

    I'm trying to use it on a website. I'm able to access all sorts of other data.

  • See the AJAX manual entry regarding cross-domain requests.

  • Ahh, I see... so it's not possible if I try to access it using a domain. It would work with an offline program however.

    That's a shame. Well, at least I have an answer now.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)