Coder Social home page Coder Social logo

alecm33 / werewolf Goto Github PK

View Code? Open in Web Editor NEW
31.0 3.0 13.0 17.31 MB

A lightweight and flexible web application for hosting a game of Werewolf (Mafia). Find it at: https://play-werewolf.app/

Home Page: https://play-werewolf.app/

License: GNU General Public License v3.0

HTML 4.49% JavaScript 81.54% CSS 13.83% Procfile 0.01% Dockerfile 0.13%
javascript websocket nodejs mafia werewolf express socket-io social-deduction social-deduction-game html-css-javascript

werewolf's People

Contributors

alecm33 avatar dependabot[bot] avatar ragaxus avatar rtmoffat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

werewolf's Issues

Creating roles sometimes creates duplicates

Using cookies to create roles, sometimes gets duplicates.

Not always reproducible.

Meredith saw like a dozen of one he created.

My situation was:

create role A
create role B
saw roles A, A, B as extras

The extra A disappeared later.

Suggestion

code should be case insensitive for when it's communicated verbally

(and maybe don't have confusing things like o/0 or 1/l)

Allow custom roles to be saved/removed

Use browser cookies to save a user's custom roles for future games. Let a user opt in to saving the role in localStorage. On the setup screen, check for saved roles in the cookies and render them if present. Also allow a user to remove any previously created custom role.

Open source license

Is your code licensed? I'm Heinrich from the Computer Science student's council in Halle, Germany.
We're host and maintain a collection of online open source board and card games (https://github.com/fsrmatheinfo/spieleabend) and we would be happy to include your great app!
Have you thought about licensing your code under any open source license?

Organize roles in my cookies

Organize the roles further:
Red & Blue split.
Under red:
Principle Evils (Werewolves) and Auxiliary Evils (Minions, etc.)

Then in blue:
Maybe something like folders. If I could title them myself, I'd go Informational, Day Deflection, Night Deflection, Protective, and Other. But maybe you want to have set ones.
Personally might like "Null Roles" for blue myself, but doubt anyone else would know what it means. Just made up the term a few nights ago for things like "Gunsmith" that really does nothing to help or hurt the village necessarily with it's ability.

Part of a future Mod Mode?

Sometimes we still forget when we are killed and click "I'm Dead" and "yes I'm dead" out of habit. If there were toggle to set the game to "No Reveal" and/or "Day Reveals Only" (tho we don't do the second option now, the option would be great and a lot of other groups use it, and it's going to prolly be a part of the next version of Ultimate Werewolf set), then maybe that toggle removes the I'm Dead button entirely...just a button that is at top maybe, somehow explicitly different that says "The Game Is Finished" for pure "No Reveal" games.

For "Day Reveals Only", there'd need to be an option for a dead player to say which type of kill it is.

Usability improvements for games with a large deck

When a lot of custom cards have been created, the setup page becomes quite unwieldy - cards take up a lot of space, which leads to lots of scrolling and difficulty determining which roles have been added. Give this view more options:

  1. Add an option to change the cards to a much more compact "list" view vs. the default gallery view (similar to Windows File Explorer).
  2. Add some sort of viewable panel that displays the current list of selected roles.

Tooltip Text Clipped

Long tooltip text gets clipped by the top of the browser window if it's one of the first few roles in the list.
description_bug

Game options in screen that shows a player's role and the role list.

Things like "Private chat is allowed-Disallowed-Neighbors only" and "May players end a day phase early?" and if so, "What happens: Sleep and wolves eat, Tribunal, Reverse Tribunal, 1-2-3 Point, etc." (<with custom ideas possible) And maybe allow multiple options within the same game if mod chooses.

Get with me and I could help define these better if you choose to do it.

Card quantities reset when a custom role is added

All card quantities are reset to 0 when a custom card is added, which can be frustrating for the user if they already constructed a deck before adding the role. Change this to preserve the quantity values from before the card was added.

Allow moderators to run the same game back again

Reshuffle (and start over) same game option?

Maybe also an "edit timer" option?

Edit by @AlecM33 - the start over option makes a lot of sense. Why make the host go back to the create screen and enter all the same options again. Striking through the timer and potentially opening it as a separate issue.

Expand unit tests

Add additional unit tests for relevant components, add coverage report.

Refactor the clock to read a single source of truth from the server

Right now each client calculates the time remaining and emits an event to end the game. Centralize this time tracking on the server and broadcast an event to all the clients when the timer expires. The current method is prone to errors (and is really just plain stupid)

Active Games

I think people just watching could be able to see active games at the time and possibly join and see what roles are in the game without being invasive to the game

Clock Running out

Could we have the clock end with a pop-up button that asks if we want to continue off the clock or end the game? We have some ideas for improved options when the time runs out, but if it's not watched closely, the clock can spoil the answers.

Make it more obvious where the player status list is during a game on a mobile device

Because of the height of the screen, all that can be seen on some mobile devices is your name, the timer, the role info button, and your role card. The player list has been pushed down out of view. To someone new to the app, it might not be clear that the player list is available and that you have to scroll to reach it.

Implement a better UI layout for mobile to indicate where the player list is. Perhaps move the list to a modal for smaller screens and have a button to activate it.

Display 6-character access code in addition to the share link

When players have joined, they can see this share option:
image

The 6 character code is also a means of joining via the app's homepage - this is because the code can actually be more convenient in certain scenarios, such as when a person wants to join on their phone and you don't have a quick way of sending the link over - they can just enter the short code instead of the whole link. It's not obvious that the last part of the link is the access code, though. We want to display it as a second field, perhaps right below the share link. Something like "Or enter this code on the homepage: [code]"

Allow toasts to be closed manually

Currently the toast element doesn't have a way to dismiss the message on command. It will always disappear automatically after a provided duration.

image

This can of course be annoying if the toast is blocking something the user wants to see - allow the user to click a small close button on the toast to dismiss it.

The toast module is found in client/src/modules/Toast.js

Allow a player's name to be edited at any time

Currently the name is entered on the join page, and if the join is successful, that permanently sets that clients name. We want clients to be able to edit their name in the lobby and during a game, and have that change broadcasted to the other clients.

Having an edit button built into this top banner on the game page might be a good implementation:

image

Ability to use hidden roles

I'd like to be able to assign roles like Hidden Lycan. App would need to show the assigned player a vanilla Villager card, but mod needs to know the hidden role in order to give proper game info.

Add E2E tests

The app has reached a level of complexity where it is becoming unwieldy to make changes without a test suite to validate browser-hosted code.

Another "mod mode" thing, maybe: Aux evil conversions

Make the role page have an option for the creator of the game to change an Evil team red to an Evil team red with a red line around it (counts for parity) mid-game. There are tons of transformation roles that trigger on different events.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.