Inspiration
Twitch Plays Pokemon seemed like a really cool idea, and I thought, why can't I try and build that?
What it does
Twitch viewers interact with the chat bot with various commands. The command is then forwarded to the Game Boy Advance Emulator. There is also a custom chat on the side to show people how quickly their commands are being sent so they can collaborate.
How I built it
I wrote a twitch chat bot in Node.js to parse that chat. It just reads for hardcoded instructions for now, meaning that it will only look for !up or !Up/!a/all the buttons, but I would like to add a token analyzer if I win the Amazon credits to allow people to make multiple instructions at a time and increase stream quality. Then, it calls a python script to call the win32 api and tap the appropriate key. Also, I built a small hack on the twitch chat api so that the stream could constantly be updating with the latest chat in a seamless way. All of this runs on a AWS EC2 container. Special note, I chose AWS because they own Twitch now and all streaming will be considered internal traffic and I will not have to pay to leave the data center.
Challenges I ran into
I couldn't get any amazon credits for this so its all out of my pocket right now, and the free instances were not powerful enough to run this app.
Accomplishments that I'm proud of
The key interaction was pretty difficult, I was satisfied with the win32 api solution as well as changing all of the inputs to the GBA Emulator to numbers as they are the most consistent to send through the win32 api. Optimizing the process scheduling to run effectively on a AWS container was very difficult as well.
What I learned
I learned how to implement a twitch chat bot, how to use python to script things similar to how autohotkey works, I learned how to embed html/javascript in a stream, I learned how to stream on twitch, I learned how to use AWS, I learned how to optimize processes for running in a container.
What's next for HackCU 3 Plays: Mystery Dungeon
Well, if I win the AWS prize, upgrade the streaming container, iron out a couple streaming bugs with AWS, add a few more chat bot features and, finally, market it a lot more to share it with more people through Reddit, Friends, etc.
Log in or sign up for Devpost to join the conversation.