Marble Race is a giveaway system designed for Twitch streamers. By having marbles bounce their way through an obstacle filled level, it makes giveaways more entertaining and tense for the viewers.
The project is available for download on GitHub, however it requires Yucibot, a Twitch bot made by Mstiekema to work on Twitch. The source code is also available on the master branch of this GitHub repository.
The clip below is a preview of the game in action during a stream of PixelsRealm, the streamer who originally came up with the idea.
Developing this game was my first Unity side project, which I used to learn more about Unity. During the first iteration I created a rough working system, which needed clean up and genericity later on. The first iteration was created in about 2 full weeks, the second iteration took me about a week.
Marble Race supports the creation of marbles at runtime by reading data from a predefined website, including textures downloaded from either local files or Twitch itself. It also includes a leaderboard to keep track of which marble is in first position. User-specific settings are also saved locally in AppData, keeping settings synced between different version of the application.
To interact with the Twitch chat and API, a custom chat bot with support for commands was written. This bot allows the users to type a simple command to join a giveaway. Their names will be written to a specified page, which can then be loaded by the Marble Race application. To get the profile picture of a joined user (which will be used as texture for the marble), the bot also translates a name into a link of that user's picture, using the Twitch API.
My role as Game Developer was to create the entire Unity app. This includes the scripts, as well as the level design and UI. To design the levels easily, a modular kit was created in 3ds Max.
As downloading from a webpage was necessary, I had to research how to access webpages from Unity. I also learned more about WebRequests and interacting with a webpage from within Unity. I had to figure out parsing in C#, as I had never done that before. Other than that, I also learned more about how leaderboards work using checkpoints.