Git Product home page Git Product logo

pitit-bac's Introduction

P'tit bac

This software is a VueJS + websockets implementation of a multiplayer “Petit Bac” game (also “Jeu du Baccalauréat”), sometimes translated as Tutti Frutti or Stadt Land Fluss, and close to Hasbro's Scattergories™.

It uses VueJS and Buefy for the (static) front-end, and a Node websocket server for the backend. The software is currently only available in French and for Latin alphabets, but this may evolve.

No account required: go to the homepage, bac.morel.games, enter your pseudonym, and play!

Project folders

commons

Contains shared and tested code for the backend and the frontend, things like answers check and votes calculations.

back

Contains the backend websocket server, handling games logic and synchronization.

front

Contains the JS frontend the users use to play the game.

Development installation

First, install all dependencies:

$ make install

Then on one terminal, start the backend server:

$ make start-back

And on another, start the front build development watchdog:

$ make watch-front

You can also start both at the same time, but you'll have to restart both if you work on the server:

$ make start

…or the Vue GUI:

$ make ui

If something fail somewhere, first, ensure you're running the correct version of NodeJS:

$ nvm use

You may have to install Node 16:

$ nvm install 16

To lint the front-end code, use:

$ make lint-front

Production deployment

Same as for the development, install all dependencies:

$ make install

Same as above, you may have to install Node 10 before:

$ nvm install 10

Then build the front-end for production:

$ make build-front

This will put all the files onto the dist folder. This folder should be served by nginx or another.

Use systemd or another dæmon system to run the backend server—see the service file for systemd in the production folder. You can customize the internal port used by the WS server using the PITIT_BAC_WS_PORT environment variable.

A nginx configuration file is provided to serve the front and proxy the websocket requests to the backend, also in the production folder.

To update, re-build the front and restart the systemd service.

Munin

Some metrics are exposed under /munin/running_games and /munin/all_games. Check out the README of the munin-http module for documentation on how to install these into a Munin node.

References

To generate filtered alphabets with frequent letters only, we used a dataset containing words from the English Wiktionary and their languages built by Tiago Tresoldi.

Tiago Tresoldi, "Extracting translation data from the Wiktionary project," in Computer-Assisted Language Comparison in Practice, 11/06/2018, https://calc.hypotheses.org/?p=32.

pitit-bac's People

Contributors

amaurycarrade avatar arnaud-d avatar dependabot[bot] avatar enzzc avatar situphen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pitit-bac's Issues

Mode solo

I know it is funnier to play with fiends, but some people like to play sometimes alone.

Add examples if no one found something

If no one found something in a category, we could display a random example from a database of answers. (This should be optional.)

The database should be manual, not from past answers (these should not be recorded in any way).

Mobile version

Display is… kinda correct on mobile devices, but it could be improved.

Vote to skip round

For hard letters, if no-one can find a word for a category, we should have a “vote-skip” button. If everyone press it, the round is skipped and the vote starts.

Add spectator gamemode

Some user just want to watch the game and not play it, having a spectator mode could be a nice addition.
Else hidding the player that didn't answer could make the voting screen shorter

Customize points

In #5's advanced settings section, we could add some options to customize the points, including the possibility to assign negative points to some cases.

Customize letters

An "advanced settings" section should be added, allowing to configure the letters that can be drawn. There would be:

  • a text field where available letters are written;
  • some presets (in a dropdown or something like that) with alphabets adapted to a language (like "Russian alphabet") and alphabets without hard letters.

Internationalization

The UI should be translated in other languages.

Creating a game should use a default alphabet linked to the user's locale.

Best replies

A player can mark any other answer as “best reply” (“coup de cœur”) and for each “best repy” received, players will get a few more points

When the slug changes after the pseudonym screen, ask to switch game

When we change the URL of the game after the pseudonym screen, the client stays connected to the same game, and nothing else changes as the game slug is in an anchor—no reloads or such. We ay want to display a confirmation message in this case, asking if the user want to leave their current game to join the new one.

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.