Open In App

Project Idea | TypeRacer-cli

Improve
Improve
Like Article
Like
Save
Share
Report

Practice touch typing and compete with your friends all from the comfort of your shell and become a typing ninja

Features:

  • Practice mode (offline mode)
  • User stats (words per minute, time taken)
  • Online mode (have a type-race by spawning up a server and sharing it with your friends)
  • Ask for a rematch after the race ends (online mode)
  • Can view the top 10 Highscores in online mode

Installation:

To install, run below command on terminal.

npm i --global typeracer-cli

Usage:

Run

typerace

or

typerace -h

Output

Usage: typerace [options] [command]

  Options:

    -h, --help          output usage information

  Commands:

    practice|p          Start typeracer
    online|o [options]  Start game in online mode

Practice mode:

To start practice mode, run below command on terminal.

typerace p

Preview of Practice mode

Online mode:

To start online mode, run below command on terminal.

typerace o -f

Preview of Online mode

    When you start online mode you will be prompted with a question:
    Are you starting server for race (y/N) ?

    Now, there are 2 cases:

    • If yes: You will share Room to join for the race, Number of racers, Number(sort of password)
      All the above will be prompted if you select yes and all of your friends should fill them out same.
    • If no: Ask for Room to join for the race, Number of racers, Number(sort of password) from your friend who created a private
      room to race.
    • Highscores

      To view the top 10 Highscores in online mode, run below command on terminal.

      typerace o -s

      Tools Used:

      • Nodejs for getting user’s input in terminal and writing server.
      • JavaScript for whole implementation of game.
      • MongoDB for storing top 10 high scores.
      • Socket.io for getting events of user and ability to play game in online mode.

      Application:

      The goal of this app is to introduce undergrads and programming newbies to two very important aspects of software development

      1. Touch Typing
      2. Using the shell

      This app combines both these goals to teach undergrads about touch typing from their shell. This serves two purposes making the students proficient in typing without looking at the keyboard and making them comfortable with using the shell and getting used to it. Both these qualities lead to higher productivity as a software developer.
      So this typeracer-cli can be classified as an educational application

      aimed at turning noob school programmers into command line ninjas.

      Another purpose this app serves it to improve the user experience or shall I say the developer experience of playing typeracer (as it is mostly programmers who play typeracer). Programmers love their shell and they also love typeracer. One of the reasons that motivated me to write this application was the question “What if developers could play their favourite game from the comfort of their terminal (which is their favourite interface)?”

      Link to project

      Note: This project idea is contributed by Kautilya Tripathi for ProGeek Cup 2.0- A project competition by GeeksforGeeks.


      Last Updated : 02 Nov, 2018
      Like Article
      Save Article
      Previous
      Next
      Share your thoughts in the comments
Similar Reads