TYPE-RACER MINI PROJECT

Hey guys,this time I'm here with a project named "Type Racer" which is written in C language using external library graphics.h.This project was made in a complete span of 1 month.

Project basically aims at testing the typing speed of user based on timed tests .The user can choose the choice of lesson and level based on his interest.
The user can refer the instructions and tips to start practicing and typing at a better speed.There are in total 3 lessons named words,basic sentences and paragraphs which will eventually increase your typing speeds.
Each level has a varying time limit such as 120/90/60 seconds.
User can either end test by choosing the END key else the test anyhow ends after the timer gets expired.There are a total of 1037 lines of code and around 11 files used in the application.

The project looks simpler but the toughest part in designing the application was the timer implementation or time based test which took me around 3-4 days of work in knowing how the keyboard inputs work,what low level key functions are,how we can listen to the keyboard events etc. and finally I came up with a solution which would measure time after every keyboard hit and read input.Using key functions I was also able to disallow the user from copy pasting the test content and to get 100% results which are usage of functions like:

GetAsyncState(VK_CODE)
which is used to determine whether a key is up or not when a function is called.VK_CODE are virtual key codes which are hexadecimal equivalent for the keyboard and mouse buttons in Windows.

The other toughest part was to handle the files when the user hits the backspace button to re-correct his mistakes which I eventually solved using fseek() and ftruncate().

The graphics.h library is used for printing graphs for user's test scores and also for the printing of finger positions instructions for the user to learn typing better.

There is a sound option as well which can be set to ON/OFF by the user.If test ends because of timer expiry then there is a different kind of alarm sound and after test ends user is displayed with all the errors he has made followed by a load screen and results.The following video shows the working of my application(Sorry for the low video quality):




For more information of the project refer:
https://docs.google.com/document/d/1DC81veLnBxqqetmr9CTg4mOxE1wX9UefLHTyw-rCpy4/edit#

Download  from the following link graphics.h library:
https://github.com/blackjackal982/graphics.h

For the source-code of the project refer:
https://github.com/blackjackal982/Type-Racer

Happy TYPING!!!! ;)

Comments

Popular Posts