Coder Social home page Coder Social logo

joelius300 / werewolf-circle Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 1.04 MB

A web application to simulate a player circle for playing Werewolf online (e.g. in a video call).

License: GNU Affero General Public License v3.0

JavaScript 1.08% HTML 1.04% Vue 11.05% TypeScript 18.36% C# 66.48% Dockerfile 1.98%

werewolf-circle's Introduction

Werewolf circle

This is a web application which can be used to simulate a player circle for playing Werewolf online (e.g. in a video call).
I started this project during rough covid times after having a bit of trouble playing Werewolf with friends in Discord since the camera tiles weren't aligned the same way for everyone so roles with positional abilities couldn't be used. Unfortunately school took up a lot of time until mid 2021 so I couldn't finish it yet and now the covid situation has gotten a lot better. This means I'm not going to finish this project just yet but I've planned it through pretty well I think so maybe I'll come back and finish it sometime in the future.

License

This project is licensed under the GNU Affero General Public License Version 3 or later. This applies to every file within this repository unless there is a license notice at the top of the file that says otherwise.
If you have any questions about this or would like to use a specific part under a different license, please open an issue and I'll try my best to assist. Also if I didn't honor your copyright or license correctly, please let me know.

werewolf-circle's People

Contributors

joelius300 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

werewolf-circle's Issues

Deploy with docker

From my limited knowledge of docker, my current idea is:

  • 1 NGINX image (reverse proxy and static file serving)
  • 1 frontend image (only contains the dist files)
  • 1 backend image (runs the backend)
  • 1 database image (for sqlite it would only store the file, for something like postgresql it would host it)

Then compose that with e.g. docker-compose and setup the whole application.

  • NGINX has to view the files of the frontend
  • backend exposes port for api etc. which NGINX forwards to
  • database either exposes a port (postgresql) or is mounted on backend (sqlite)

Again, I'll have to figure out how to do this correctly as I've never worked with docker before.

References:

Localize frontend

The first version is german so it's ready to use soon. Later on I'd like to default to english and allow a language drop-down with localization.

Add roles and factions (no localization)

Scheme

  • Every alive player has one or more roles
  • Every alive player belongs to one faction
  • Every role belongs to a faction which determines the initial faction of the player
  • Not all factions are associated with a role
Entity A Relationship Entity B
Player mc --- m Role
Player mc --- 1 Faction
Role c --- 1 Faction

UI

Player

On the user interface, the players sees all of their roles and their faction.

Admin

I'm imagining something like the GitHub labels dialog to pic the roles for a player. Similarly for the factions but there it's exclusive so only one faction can be chosen.

https://github.com/vueform/multiselect probably
Also see shentao/vue-multiselect#1369

Allow admin to choose which roles (and their quantity) will be randomly distributed.

Add admin user (creator of the lobby) which isn't in the circle

Backend

Realtime only concept

  • Connection-Id of Admin-User is stored in a column on Game.
  • Lookup on each action if the connected user is the one stored.

JWT concept

  • Nothing is stored in the database.
  • Admin JWT is generated once on game creation.
  • User is identified with a claim (probably role = Admin) and allowed to access the admin endpoints.

Frontend

  • After creation of game, do not join it. Instead render a admin page for created game.
  • Redirect to admin page if the user is known to be the admin of a game (similar to in-game players).

Switch to cleaner but more complex concept using an API

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.