Skip to content

ayeshakhalid192007-dev/typing-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typing Master 🎯

Typing Master is an educational typing game designed to help users improve their typing skills through structured practice levels, real-time feedback, and performance tracking. This console-based application provides a comprehensive typing tutor experience with multiple difficulty levels, user authentication, and multiplayer functionality.

Table of Contents

Features

🎮 Game Modes

  • 5 Progressive Levels - From basic home row (ASDF) to full keyboard mastery
  • Sentence Practice - Advanced level with complete sentences for speed building
  • Time-limited Challenges - Each level has time constraints for realistic practice
  • Multiplayer Duel - Compete against other users with the same word set

📊 Performance Tracking

  • Session Statistics - Detailed metrics for each practice session
  • User Profiles - Personal accounts with persistent data storage
  • Accuracy Calculation - Real-time accuracy feedback with percentage
  • WPM Calculation - Words per minute speed measurement
  • Progress Monitoring - Track improvement over time

🎨 User Experience

  • Beautiful UI - Unicode borders and modern console interface
  • Color Coding - Visual feedback for correct/incorrect entries
  • Progress Bars - Visual indicators of completion
  • Performance Stars - Rating system based on accuracy
  • Encouragement Messages - Motivational feedback based on performance

🔊 Audio Feedback

  • Key Click Sounds - Audible feedback for typing
  • Success Tones - Positive audio cues for correct entries
  • Error Tones - Audio feedback for mistakes
  • Configurable Sound Settings - Toggle audio on/off

🔐 User Management

  • User Authentication - Secure login/registration system
  • Database Storage - Persistent user data in CSV format
  • Profile Management - View and track user statistics
  • Switch User - Easy switching between accounts

Levels

Level 1: Home Row - Left Hand

  • Keys: A S D F
  • Focus: Building left-hand muscle memory
  • Items: Basic key combinations and simple words
  • Time Limit: 30 seconds

Level 2: Home Row - Both Hands

  • Keys: A S D F J K L ;
  • Focus: Extending to right hand
  • Items: Short words combining both hands
  • Time Limit: 30 seconds

Level 3: Top Row & Numbers

  • Keys: 1-5, Q W E R T Y U I O P
  • Focus: Adding top row keys and numbers
  • Items: Words incorporating top row characters
  • Time Limit: 30 seconds

Level 4: Full Keyboard Mastery

  • Keys: Full keyboard (all letters, numbers, special characters)
  • Focus: Complex 7-8 letter words
  • Items: Advanced vocabulary and typing challenges
  • Time Limit: 30 seconds

Level 5: Speed Challenge

  • Keys: Full keyboard with spaces and punctuation
  • Focus: Sentences and phrases for speed building
  • Items: Complete sentences with proper grammar
  • Time Limit: 60 seconds

Installation

Prerequisites

  • C++11 or higher compatible compiler (g++, gcc, or MSVC)
  • CMake (optional for building)
  • Git (optional for cloning)

Building from Source

  1. Clone or download the project files
  2. Ensure all source files are present:
    • main.cpp
    • TypingMaster.h
    • TypingMaster.cpp
  3. Compile using g++:
    g++ -std=c++11 -o typing_master main.cpp TypingMaster.cpp
  4. Run the executable:
    • Windows: typing_master.exe
    • Linux/Mac: ./typing_master

Usage

  1. Launch the application
  2. Register a new account or Login to an existing one
  3. Choose from the main menu options:
    • Start Game - Begin from your selected level
    • Select Level - Choose a specific level to practice
    • View Statistics - See current session stats
    • How to Play - Get tips and instructions
    • View Profile - Check your overall progress
    • Switch User - Change to a different account
    • Multiplayer Duel - Compete against another user
    • Exit - Save progress and quit

Game Flow

  1. The application displays the target text to type
  2. Type the text exactly as shown and press Enter
  3. Receive immediate feedback (✅ for correct, ❌ for incorrect)
  4. Continue through all items in the level
  5. View detailed results at the end of each level

Platform Support

Windows

  • Full Unicode support with proper console configuration
  • Audio feedback using Windows Beep API
  • Proper UTF-8 output handling

Linux/macOS

  • ANSI color support
  • System audio feedback using console bells
  • Standard POSIX compatibility

Console Compatibility

  • Automatic detection of console capabilities
  • Fallback ASCII characters for basic terminals
  • Environment variable overrides for customization

Configuration

Environment Variables

  • NO_COLOR - Disable all color output
  • NO_UNICODE - Disable Unicode characters and use ASCII fallback
  • NO_SOUND - Disable all audio feedback

Settings

  • Case Sensitivity - Toggle for case-sensitive typing (default: insensitive)
  • Colors Enabled - Enable/disable color output (auto-detected)
  • Unicode UI - Enable/disable Unicode characters (auto-detected)
  • Sound Enabled - Enable/disable audio feedback (auto-detected)

Multiplayer Mode

The multiplayer duel feature allows two users to compete against each other:

  1. Select a level to compete on
  2. Choose an opponent user from the database
  3. Both players type the same set of words
  4. Results are compared based on:
    • Score (primary)
    • Accuracy (secondary)
    • Words Per Minute (tertiary)
  5. Winner is determined and displayed

Performance Tracking

Session Statistics

  • Words Attempted - Total words attempted in the session
  • Words Correct - Number of correctly typed words
  • Words Wrong - Number of incorrectly typed words
  • Accuracy - Percentage of correct words
  • Total Time - Time spent in the session
  • Speed (WPM) - Words per minute calculation
  • Score - Total points earned
  • Rating - Star rating based on accuracy

User Profile Statistics

  • Games Played - Total games completed by the user
  • Total Words - All words attempted across sessions
  • Total Correct - Total correct words across sessions
  • Overall Accuracy - Average accuracy across sessions
  • Overall WPM - Average words per minute across sessions
  • Best Accuracy - Highest accuracy achieved
  • Best WPM - Highest words per minute achieved
  • High Score - Highest score achieved

Customization Options

Visual Settings

  • Color Themes - 7 color options (green, red, yellow, cyan, blue, magenta)
  • Unicode Borders - Sophisticated border characters or ASCII alternatives
  • Progress Visualization - Filled/unfilled progress bars with percentage

Audio Settings

  • Key Click Sounds - Adjustable based on typed characters
  • Error Feedback - Distinct sounds for incorrect entries
  • Success Tones - Positive audio confirmation

Difficulty Settings

  • Time Limits - Adjustable per level
  • Item Count - Number of words per level
  • Item Complexity - Word length and complexity

Development

Source Structure

  • main.cpp - Entry point and basic application setup
  • TypingMaster.h - Class definition and interface declarations
  • TypingMaster.cpp - Implementation of all functionality

Key Classes

  • TypingMaster - Main application class
  • LevelConfig - Configuration for each typing level
  • Stats - Session and level statistics tracking
  • UserProfile - User account and progress data

Dependencies

  • Standard C++ library (iostream, string, vector, chrono, etc.)
  • Platform-specific console APIs (Windows.h for Windows)
  • Cross-platform threading support

Compilation Notes

  • Uses C++11 standard for broad compatibility
  • Includes platform-specific code for console capabilities
  • Cross-platform sleep functions for audio feedback

Technical Specifications

Memory Management

  • All memory handled automatically by standard containers
  • No manual memory allocation/deallocation required

Performance

  • Optimized string operations
  • Efficient random shuffling algorithms
  • Minimal resource usage

Data Persistence

  • CSV-based user database (users.db)
  • Automatic save/load on application start/end
  • Thread-safe database operations

Acknowledgments

Typing Master provides a comprehensive, cross-platform typing tutor solution with professional-grade features and educational value. The application emphasizes user experience, performance tracking, and progressive skill building through structured levels.

The codebase demonstrates modern C++ practices while maintaining accessibility for learning and modification.

About

Educational typing game to improve typing skills with progressive levels and performance tracking

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages