In the time of corona, it can be great to interact with friends over group video chat, and especially to play games. Similarly to Cards Against Humanity or other collaborative games, we thought it would be great to implement Mafia in a virtual setting.
What it does
Mafia, or variants like One Night Werewolf, involve several players with secret roles including mafia, detectives, protectors, and townspeople. The goal is to have a central game room from which events are announced, yet secret events such as the mafia gathering to decide a victim or the detectives meeting to choose suspects. Thus, some players' video and audio need to be turned on periodically without others knowing.
How I built it
We used Twilio's programmable video API and group rooms with React.JS to host the game rooms and implement the game logic.