Is there an online version of mafia/werewolf game that I can play with my friends. I tried to find one but there doesn't seem to be a good one.
I'm the creator of https://werewolv.es which is an in-browser version of werewolf. The games are more like individual chat rooms or slack/irc channels than the usual forum/message board variants you find online. Most of the games on the site take place over several days, but plenty of 'speed games' are played where the rounds a few minutes.
I decided to embrace the online aspect of this version of the game and added features that would be difficult or impossible to simulate in face to face play. Each game is played with a distinct theme (usually taken from a film or tv series) and players are given a random avatar in addition to their role. This gives a degree of anonymity (at least at the start) to the game.
The anonymous avatars also allow for additional avenues of play. For example, the Puppetmaster has control of 2 extra identities in the game, and can freely talk as them, allowing the Puppetmaster to counter claim and cause confusion in chat.
Town of Salem - https://store.steampowered.com/app/334230/Town_of_Salem/
as of a few months ago, it was quite good, and quite active.
A group of friends of mine played a number of Mafia games online just by using a webcam conference program of some sort and some form of IRC/chat. (I think the first rounds were played via a more traditional IRC, a few later rounds were played in Discord with the help of a specially programmed bot.)
As usually in irl games, one person was a designated game master who handed out roles by private messages and regulated the time and day/night phases.
Night phase was simulated by the players turning off their webcams and if they had an active role PM’ing the game master their action. Everybody was awoken (turned their webcams back on), the game master announced the outcome of the night and on it went.
Voting was done rather interestingly: as for the night phase, everyone turned off their webcam (except for the accused) and then turned it on again on the game master’s count. Whoever had their hand visible on camera (usually by putting it in front of the lens) was counted as a kill vote.
This solution of course requires some sort of conference program that can display multiple webcam images across all participants. And all were further connected in a voice chat. It probably is the closest the game can come to IRL mafia while remaining online.