Inspiration

I enjoy watching Twitch in my spare time and I also loved the phenomenon a couple of years ago called Twitch Plays Pokemon, where users could type in the chat to try and control the game.

What it does

Right now, it's pretty simple. It's an implementation of Conway's Game of Life, a cellular automaton. The rules to the simulation are:

Any live cell with fewer than two live neighbours dies, as if caused by under-population.

Any live cell with two or three live neighbours lives on to the next generation.

Any live cell with more than three live neighbours dies, as if by over-population.

Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The project is integrated with Twitch, a video streaming service and OBS, Open Broadcaster Software. Users can participate in chat to affect the simulation. Users can type flip r,c to change the cell at that row and column to alive or dead.

How I built it

I used Python and Pygame for the actual implementation of the simulation and used the Twitch IRC Chat API to get user input.

Challenges I ran into

Setting up the streaming was hard at first and the medium at which I wanted to display it was hard to decide. I finally at the end decided I would create a Pygame window and have OBS broadcast that. Also connecting to the Twitch API was hard at first, since I have never used it before.

Accomplishments that I'm proud of

I have used Pygame before, but I am proud that I was able to figure out how to use the API, and finished basic implementation in time

What I learned

Learned about broadcasting and the Twitch API

What's next for Twitch Game Of Life

Have users be able to place certain patterns, add teams, running headless on remote server

Built With

Share this project:

Updates