Skip to content
/ Typon Public

A multi-featured typing practice tool that runs on a terminal emulator which can turn any text file into a typing game.

License

Notifications You must be signed in to change notification settings

ihsuy/Typon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Typon

Typon(タイポン|Tai-Pon) is a typing practice tool that runs on a (linux/MacOS) terminal emulator.

With it, you can

Featured Mode: Challenge Mode

If you start a Game under Challenge Mode, the opponent's text cursor will appear and start a Race with you.
If you manage to finish before the opponent does, Congratulations, you've beaten your previous Best record.

Know more about the Challenge Mode .

Installation

Compile Dependencies

NCurses

Install From Source

Open your terminal in your preferred directory and clone this repository:

git clone https://github.com/ihsuy/Typon

Run the makefile

cd Typon/Typon/
make

Run Typon (window too big? learn how to customize)

./typon

Install: After building the binary, you can choose to install Typon to your usr/local/bin directory by

[sudo] make install

Now you could run Typon from anywhere with

typon

Note: a folder containing some random quotes is included, feel free to add new ones or modify the old ones.

Enjoy typing


Useful flags

Resize
-resize [width][heigh] (My favorite setting is width:75~80 height: 23~29)

Locate
-path

Disable Shuffling
-noshuffle


Regular Gameplay

The Typon's regular game flow goes like:

Start Screen -> Typing -> End Screen -> Start Screen -> ...

About Menu

You can launch Menu at almost anytime by pressing

tab

The Shortcut to every option in Menu can be accessed by pressing the First letter of each option.

a and d are usually synonymous with Arrow Left/Right.

Number keys can be used to quickly move to the n-th option.

Start Screen

The Start Screen will be shown before each game begins.

On the Start Screen, a quote chosen from your "quotes" directory and a message asking whether if you would like to begin typing will appear.

You can press the first letter of the quote or space key to begin the game. Pressing the first letter will save you the reaction time to find and press the first letter on the keyboard which will result in faster completion.

End Screen

The End Screen will be shown before each game completes.

On the End Screen, Typon shows all in-game inputs including those incorrect inputs, and also shows the time, number of mistakes, and WPM (word per minute).
The formula that Typon used to calculate WPM is:

Watch How You Did: Replay

On End Screen, to view your last game play, press

r

Note: You can then choose to skip the replay by choosing SkipToEnd in the Menu.

Manually Select Quote: Goto

On Start Screen and End Screen only,
to jump to any quote in the current jumble of quotes by inputting its ID

hyphen (-)

Note: A prompt will appear.


Track Your progress

After each game is completed, Typon saves records about Quote ID, WPM, Number of Mistakes and Date.
On Start Screen and End Screen, You can access them and the game statistics by selecting the History option in Menu.

In history, you can

Navigate through records

Arrow Up/Down

Going Up/Down page by page

w or s

Jump directly to a quote by navigating to its record and press

Space

Move across the column

Arrow Left/Right

Sort by column

Return

Note: When Sorting By Different Columns, if possible, the previous order will be preserved.

Check game statistics

0

Note: Typon collects statistics on:

  • All Time Average WPM
  • All Time Average Mistakes
  • First 20 Games Average WPM
  • First 20 Games Average Mistakes
  • Recent 20 Games Average WPM
  • Recent 20 Games Average Mistakes
  • Number of Games Played
  • All Time In-Game Key Pressed

Contest Your Previous Best Record

Typon keep track of every detail of every valid input in each game, but only saves the details of your Fastest Game Play which will be used in the Challenge mode.

Under this mode, the opponent's text cursor (Your previous best record) will appear and start a race with you.

If the Best Record exists for the current quote ID, You can launch Challenge mode on the Start Screen by pressing

0

Or remove the current quote's Best Record by pressing

delete

Note: Removal of the best record will temporarily disable Challenge Mode for this quote.
           A message asking for confirmation will appear.


Customize Your Quotes Directory

Typon can read in any text file(.txt) and lets you practice typing with it, but the max length of your text file may vary depending on the terminal window's size. (resize Typon window)

Typon File Structure

As demonstrated above, in order to make your text files accessible by Typon, you need to store them in the quotes directory under Typon's root directory and title them according to a certain naming rules.

If you forgot your default Typon root directory , use this flag to locate it:

typon -path

Quote Naming Rules

  • Name of the text file must be of the form: quote[ID].txt
  • ID must be a non-negative integer ranging: [0, MAX_ID)
  • MAX_ID, by default, is set to be: 3001

Note: I didn't feel the necessity to make MAX_ID an optional value, however, it can be easily modified in the           source code.

Any text files that are not in Typon's quotes directory or does not follow the aforementioned naming rules will be ignored by Typon.

Since Typon doesn't keep a copy of the content of all the text files, it only recognizes the quote ID. If the ID isn't changed, Typon assumes that its contents remain the same.

Note: Typon checks the text file's content, only when the user tries to start a game under challenge mode,            since the incorrect record may result in undefined behaviour.

More About Text File Contents

If the window's size allows, Typon accepts any content as long as its in English Language. If possible Typon also preserves the original format of your text file.

Content Prettify: If a line is too long, Typon will start a new line at an appropriate postion to avoid disjointed words unless the word is wider than the window which is very unlikely.

Changing Appearance

Resize Typon

When the quote that you're trying to use is too long to display, you may have to resize Typon.

There are two different ways to resize Typon:

  1. Resizing the terminal window before launching Typon

Note: This lets Typon automatically fit into the Terminal window. (won't be larger than width: 110 x height:110)

  1. Use the -resize[width][height] flag, for example:
typon -resize 90 30

Note: This forces Typon to be exactly the size specified by the input, and it can resize Typon to any size as long as you have a large enough Terminal window.

Note: Either way, you can't resize Typon to larger than the current Terminal window's size, or smaller than
Absolute minimum window width: 55 x Absolute minimum window height: 20.
Forceably resizing terminal to an invalid size will cause Typon to quit.

Change Typon's color setting

Typon only uses the 8 basic colors on Terminal, namely:

  • Black
  • Red
  • Green
  • Yellow
  • Blue
  • Magenta
  • Cyan
  • White

Current versions only support changing Typon's color setting by modifying Terminal's color definition.

Credits

Heartful thank you to:

  • Anna and farleyoli for great suggestions and advices.

License

MIT

About

A multi-featured typing practice tool that runs on a terminal emulator which can turn any text file into a typing game.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published