Building a Twitch ChatBot using in-game data | by Isak Höglund | GRID Esports
Building a Twitch ChatBot using in-game data
A GRID Open Access Case Study
5 min read · Mar 29, 2023
We hope this article will serve as a useful resource for developers who are looking to explore and build on the GRID Open Access. Open Access is a program that enables creators and independent developers free access to official data and services available on the GRID Data Platform.
In this case study we will look at the integration built by Isak Fagerlund. Last month during the CCT Central Europe Finals in Malta, CS:GO Tournaments, Isak released a chatbot built on top of GRID Open Access data. This week, we got an opportunity to sit down with him and talk about the process, in-game data, and the future of a data-driven ecosystem.
Thanks for taking the time and congratulations on launching your GRID Open Access project! Could you tell us a little about yourself?
Of course! My name is Isak and I’m coming up on a decade of working as a software engineer. I’m originally from Sweden and moved to Berlin, Germany in late 2017. As working with APIs goes, I’ve always loved to build things so I believe that’s where I got the passion for programming and problem solving. On my day to day, I work as a Software engineer at Enpal.
Can you explain how your integration works and what it does?
So the basic explanation is that it listens to the Twitch chat during an ongoing game or tournament that GRID covers and then displays information based on what the chatters are requesting. In the case of the CCT Central Europe Finals it was extracting data points such as:
- Real time kill events from all players in the event and sorting them to display which player was the current highest fragger of the event.
- Information about the next upcoming series and the previous played series, so e.g. what teams are playing, at what time.
The project is built on top of JavaScript and Node.js. Then the Open Access APIs feeds the data and a library called tmi.js helps with processing (reading and posting) information in the Twitch chat.
If you are interested in more details you can find the full project over here.
What motivated you to use the GRID Open Access APIs for your integration?
I’ve had an interest in gaming for a long time and a friend told me about the API so I became interested in checking it out. It felt like a good opportunity to build a small fun project outside of my normal day work, while getting an insight into the gaming & esport world.
How did you go about designing and developing the integration?
I started with having a look at what information that was available in the APIs through the schemas and tried to extract the data points I was interested in, then finally I built on top of that. I’d say I spent around 2–3 evenings on the project so I’m quite happy with the outcome.
How was it building on the GRID Open Access? What was the most interesting part?
It was a fun project for me because under the course of the development, I faced challenges that I was able to deal with, without using any fancy technology to solve it. Generally when programming professionally, there are a lot of rights and wrongs but these kinds of projects give you the ability to wing it and focus on building.
In regards to the API itself, the Live Data was really cool and exciting to work as you could see the events in sync with what happened on the official streams. The Open Access APIs does the heavy lifting for you and you can e.g. build an application for live scores quite quickly.
What challenges did you face during the development process, and how did you overcome them?
An initial challenge was realizing that you sometimes need to combine the APIs to extract the data we wanted. For example using the Static Data API (Central Data Feed) to find the Series IDs that you would then use in the other Live Data API (Series State Feed) to extract in-game events, such as kills.
Do you have any advice would you give to other developers looking to build an integration on top of the GRID Open Access?
Try to have fun with it! Find out what is possible, ideate and then build it. For me it was an opportunity to explore a new space and add to my project portfolio. Also, don’t be afraid of reaching out to staff at GRID with any questions as they we’ve very helpful.
How do you see the future of gaming data and the role that products such as GRID Open Access will play in it?
I feel like the utilization of data in all forms is becoming more and more relevant these days. Be it who played your track on Spotify, how many steps you took or what data set the latest AI was trained on. Having high quality and reliable data to work with seems to be a growing need, not only to support your own business but also to fuel the communities around it. I can see a lot of data use-cases in both the gaming and esport industries so if GRID can provide a singular hub for this data, that would be really useful.
This case study covered one of many unique and interesting projects that are built on the GRID Open Access benefiting from free access to official game data.
Do you have an idea you want to bring to life?
Sign up for the GRID Open Access at grid.gg/open-access or reach out to Isak at isak.hoglund@grid.gg . We’ll be happy to consult and help you get started!
Make sure to follow GRID on LinkedIn and Twitter for news and updates on esports and game data- and keep an eye out for future articles from Isak for help in building your esports applications!