Our goal was to find a new way to engage viewers so they stay tuned in to their favorite streamer and to turn lurkers into active participants. We came up with a game designed for Twitch that brings the viewers into the game and makes them more invested in the stream. We wanted to make an easily approachable and quick game that could be played as part of a stream warm-up or cooldown or even in-between rounds of other games. We wanted to also give a platform for the streamer to choose how to interact with their audience, whether they are asking their viewers for help, taunting them to give them a challenge, or dividing chat against itself.
What it does
The game is a lane-defending game where the streamer can use several defending unit classes and items to defend their castle. Viewers use the Twitch extension to give the streamer defending units and items while also providing a challenge for the streamer by summoning enemies and bosses. Basic units are open to all users, while the more powerful units and items require Bits towards the streamer. In-game alerts and usernames above units help the streamer recognize viewers who are using Bits through the extension.
How it's built
Our extension is built using React and communicates with the game through an API on AWS. When a user summons an item or unit, the extension calls the API to add the item to the inventory for that streamer. Lambda running Node.js handles the request and persists data in DynamoDB. The game is built in Godot and periodically fetches inventory updates from this API. Several in-game events also call the API to trigger PubSub updates to all instances of the extension (for example, when the game switches state between online and offline).
Challenges we ran into
Beyond building an extension and backend, we put a lot of planning and work into designing and building a game aimed at Twitch. We went through many concepts trying to find a good balance that was simple to understand, fun to play, and provided a variety of ways to integrate Twitch viewers into the concept. Since the game relies on viewers, we also had to ensure the concept would work on streams of any size, from 100 participants to thousands.
This was our first game development project using Godot engine, so there was a lot to learn in a short time period to build a game from scratch and have it integrate with Twitch. We had to put effort into optimizing the game as much as possible to keep resource usage low, for situations where a streamer may be playing our game while waiting for another game round to start. Combining this with the fact that there may be many viewer-submitted units on screen, we decided to build our own Godot module in C++ to optimize the loading and display of animated sprites. This lead to significant decrease in RAM usage without making changes to our art pipeline.
This was also our first project using Lambda and DynamoDB. We had to adapt our knowledge of relational databases to the Dynamo model, but in the end feel pretty comfortable with the AWS stack.
We have several key features we are working on building into the game (like a leaderboard). Then we plan on doing a closed alpha release with some streamers to gather feedback and help validate the game concept and design, then start iterating on the game to add more features and depth for full release. We have lots of ideas on ways to make the gameplay more engaging for both streamer and viewer, and other options for increasing streamer Bit revenue.