Skip to content

rjburgerr1/Trials-Ninja-Points

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository for Trials Ninja Points

What is Trials Ninja Points?

TNP is a website where ninja riders from the game franchise Trials compete based on in-game & opinion-based metrics.

How are Ninja Points Defined?

1. Ninja Points are composed of subjective & objective measures for a run on a track

Metric Type Description
Faults Objective The amount of times a player resets to a checkpoint during a run on a track in game. (1-499 faults possible per run)
Time Objective The amount of time a player took to pass a track in game. (<29:59.999 minutes possible)
Ninja Level Subjective The rider's own opinion of how difficult a track feels to them, relative to other tracks that they've played (rated on a scale of {0.5 > x < 9.5})
Length Subjective The rider's own opinion of how long a track feels to them, relative to other tracks they've played. Thought of based on number of obstacles. (Rated on a likert scale)
Consistency Subjective The rider's own opinion of how consistent a track feels to them, relative to other tracks they've played. Thought of best by how likely a rider is to fault given all obstacles on a given track. (Rated on a likert scale)

2. Ninja Points are calculated using an algorithm created based upon those 5 measures

3. The higher/lower the ninja points are for a given run, the better/worse the run is, respectively


Website Composition

  • MySQL Relational Database
  • React Frontend App
  • Node.js Backend Server
  • Prisma object-relational mapper
  • Flask micro web framework written in Python


Quick-start for Contributing

1. Install Node.js (npm -v to check version)

2. Fork & Clone Repo git clone https://github.com/rjburgerr1/Trials-Ninja-Points.git

  • Setup for React Frontend App, Node Backend Server & Flask Backend Server

    1. Change directory into base directory cd Trials.com/

    2. Install Node Modules npm install --workspaces

    3. Setup .env files using .env.development.sample files

      1. edit ~Trials.com/react-frontend/.env.development.sample & ~Trials.com/node-server/.env.development.sample by filling out required environment variables
      2. rename .env.development.sample to .env.development
    4. Run start scripts for node backend & react frontend npm start --workspace=node-server && npm start --workspace=react-frontend

    5. Change directory into flask directory cd flask-backend

    6. Run development/debug script for flask (Python) ./server-debug.sh


    # All commands for above steps, to start.
    
    # Change directory into base directory
    cd Trials.com/
    
    # Install node_modules
    npm install --workspaces
    
    # Setup .env files (using nano if on linux)
    nano node-server/.env.development.sample
    nano react-frontend/.env.development.sample
    nano flask-server/.env.sample
    
    # Run start scripts for node-server & react-frontend (open two new terminals for this)
    npm start --workspace=node-server
    npm start --workspace=react-frontend
    
    # Run start script for flask development server
    cd flask-backend
    ./server-debug.sh
  • Setup MySQL Database

    1. Install MySQL workbench (optional) & MySQL Server (If on windows, this can be done with the MySQL installer)
    2. Run init.sql