A throwback typing and math game with simple mechanics and a retro aesthetic.
- Typing Mode: Classic typing test with real-time WPM, accuracy, and error tracking
- Math Mode: Mental arithmetic challenge with configurable operations and difficulty
- Practice and scored modes for both game types
- Retro CRT terminal aesthetic with scanlines, phosphor glow, and flicker effects
- Procedurally generated chiptune music (menu and gameplay tracks)
- Keyboard click sound effects
- 4:3 aspect ratio with letterboxing for authentic arcade feel
- Two bundled retro fonts (VT323 and Courier Prime)
- Separate top 10 leaderboards for each difficulty level:
- Typing: Easy, Medium, Hard
- Math: Simple, Standard, Advanced
- Local JSON-based storage
- Multiple error handling modes (must correct, allow continue, block and beep, auto skip)
- Three difficulty levels per game mode with unique wordlists/problem sets
- Adjustable CRT effect intensity (scanlines, flicker)
- Audio settings (volume, enable/disable music and sound effects)
- Fullscreen and windowed modes with Alt+Enter toggle
- Python 3.8 or higher
- Linux (first-class support) or macOS
- Dependencies (auto-installed via requirements.txt):
- pygame >= 2.5.0
- numpy >= 1.24.0 (for audio generation)
- Clone the repository:
git clone https://github.com/Faileb/digitdestroyer.git
cd digitdestroyer- Create a virtual environment (recommended):
python3 -m venv venv
source venv/bin/activate # On Linux/macOS- Install dependencies:
pip install -r requirements.txtRun the game:
# Using virtual environment (recommended)
source venv/bin/activate
python3 -m src.main
# Or directly with venv python
venv/bin/python3 -m src.main- Arrow keys: Navigate menus
- Enter: Select menu option
- Typing Mode: Type the displayed text
- Math Mode: Type numerical answers
- Alt+Enter: Toggle fullscreen
- ESC: Return to menu / Quit
digitdestroyer/
├── src/ # Source code
│ ├── main.py # Entry point
│ ├── game.py # Main game loop and state manager
│ ├── config.py # Game configuration constants
│ ├── core/ # Core game logic
│ │ ├── metrics.py # WPM/accuracy calculations
│ │ ├── text_loader.py # Wordlist management
│ │ ├── math_generator.py # Math problem generation
│ │ ├── leaderboard.py # Leaderboard management
│ │ └── settings.py # Settings management
│ ├── rendering/ # Visual effects
│ │ └── crt_effects.py # CRT scanlines, flicker, glow
│ ├── audio/ # Audio system
│ │ ├── audio_manager.py # Audio coordination
│ │ ├── music_generator.py # Chiptune music generation
│ │ └── songs/ # Music composition modules
│ └── states/ # Game states (menus, gameplay)
│ ├── menu_state.py # Main menu
│ ├── typing_state.py # Typing test gameplay
│ ├── math_state.py # Math mode gameplay
│ ├── leaderboard_state.py # Leaderboard display
│ ├── settings_state.py # Settings menu
│ └── ... # Other menu states
├── assets/
│ ├── fonts/ # Bundled fonts (VT323, Courier Prime)
│ ├── sounds/ # Sound effects (currently empty, using generated audio)
│ └── wordlists/ # Difficulty-based word lists
│ ├── easy/
│ ├── medium/
│ └── hard/
├── config/
│ └── settings.json # User configuration (auto-generated)
├── leaderboard.json # Leaderboard data (auto-generated)
├── requirements.txt # Python dependencies
└── README.md # This file
Game settings are stored in config/settings.json (auto-generated on first run with defaults).
You can configure:
- Display: Fullscreen mode, font selection
- Audio: Music volume, music enable/disable, sound effects
- CRT Effects: Scanline and flicker intensity (off, low, medium, high)
- Typing Mode: Error handling mode, difficulty level
- Math Mode: Preset difficulty, enabled operations, digit count, decimal support
Custom wordlists can be added to the appropriate difficulty directory in assets/wordlists/ (easy/medium/hard).
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.




