Sign inSign up

daelinc/skillbasedmatchmaker

By daelinc

•Updated over 2 years ago

A nodeJS skill based matchmaker

Image
0

325

daelinc/skillbasedmatchmaker repository overview

⁠Skill Based Matchmaker

⁠Description and Features

This project allows you to create teams of players based on their rankings in a particular game.

The user has options to:

  • create players
  • create games
  • add scores to players for a particular game
  • share the leaderboard with others

Once scores have been added for some players in a a game, a ranking table is shown (you can change the game you're viewing using the dropdown menu). These scores are calculated using a weighted average of all a player's scores, giving more weighting to newer scores.

The user can then click each of the players to add them to a team. As you add players, the teams are randomized while still trying to make them as fair as possible. You an click a player again to remove them from a team.

The Leaderboard view calculates points for each player across all games based on their position in the rankings of each game. This allows you to see who is best across all games. You can also make teams based on these points.

There are options to create 2, 3 and 4 teams from you selection (using the drowdown menu).

⁠Authentication

This project uses Google and GitHub OAuth for sign in which allows multiple users to have they're own players, games and scores.

You will need to provide your own client_id and client_secret for both Google and GitHub for this to work. You can search Google for how to get these.

⁠Running the project

⁠Docker
⁠Create the image

Navigate to the root directory of the project

docker build -t matchmaker .
⁠Create data files

At this stage, the data files may not be generated automatically.

If this is the case, create the following files in the data folder. Each file should contain an empty array (i.e. []).

  • players.json
  • users.json
  • games.json
  • scores.json
  • shared.json
⁠Running the container
docker volume create matchmaker_data;

docker run -d -p 3000:3000 -v matchmaker_data:/usr/src/app/data \
    -e GOOGLE_CLIENT_ID=xxx \
    -e GOOGLE_CLIENT_SECRET=xxx \
    -e GOOGLE_CALLBACK_URL=xxx \
    -e GITHUB_CLIENT_ID=xxx \
    -e GITHUB_CLIENT_SECRET=xxx \
    -e GITHUB_CALLBACK_URL=xxx \
    -e SESSION_SECRET=<any random string you want> \
    -e URL_PATH=/matchmaker \ #optional
    --name matchmaker daelinc/skillbasedmatchmaker:latest

Tag summary

Content type

Image

Digest

sha256:0965bec8c…

Size

409.1 MB

Last updated

over 2 years ago

docker pull daelinc/skillbasedmatchmaker