P2P Mafia

P2P Mafia

2 devlogs
3h 9m
Created by DJ_Laser

A simple website to help facilitate irl or online games of Mafia/Werewolf
Everything is handled entirely by the host webpage, with no central server. This ensures a consistent experience can always be achieved regardless of the number of users or rooms.

The `peer-mafia` project in hackatime was for shipwrecked, all time since then has been tracked using the `peer-mafia-som` project name to keep the time seperate

Timeline

heres a lil demo of the features it's got so far!
I still need to add custom roles and a shuffler, but for simple games it works great!

The main logic was completed during shipwrecked, so I spent a bit of time adding polish!
You now get a confirmation screen when kicking players where you may optionally send them a reason for kicking.
Disconnected players are now treated the same as connected players for the host, instead of simply disappearing they stay in the UI but have a (Disconencted) label near their name.
This helps the game move smoothy if a player accidentally closed a tab for example. (They can rejoin as long as their browser cache was not cleared)
For players who actually wanted to leave the host can kick them, though I plan to add a button on the client to remove yourself from a room

Update attachment