Skip to content

devinnicholson/terminal-defender

Repository files navigation

╔════════════════════════════════════════╗

║ TERMINAL DEFENDER ║

║ ~ A Retro Bash Command Game ~ ║

╚════════════════════════════════════════╝

 _____                    _             _   ____        __               _           
|_   _|__ _ __ _ __ ___ (_)_ __   __ _| | |  _ \  ___ / _| ___ _ __   __| | ___ _ __ 
  | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | | | | | |/ _ \ |_ / _ \ '_ \ / _` |/ _ \ '__|
  | |  __/ |  | | | | | | | | | | (_| | | | |_| |  __/  _|  __/ | | | (_| |  __/ |   
  |_|\___|_|  |_| |_| |_|_|_| |_|\__,_|_| |____/ \___|_|  \___|_| |_|\__,_|\___|_|   

🎮 HOW TO PLAY

🚀 Quick Start:

# Clone and run the game
cd terminal-defender
./run-game.sh

# Or simply open in your browser
open index.html

🕹️ Game Controls:

  1. Type bash commands in the terminal prompt
  2. Press ENTER or tap EXECUTE button
  3. Watch enemies explode when you use the right command!

📺 Game Overview

Terminal Defender is a cute retro-style game where you protect your system by typing real bash commands! As enemies descend from the top of the screen, you must quickly type the correct commands to defeat them before they reach the bottom.

    ╔═══════════╗       ╔═══════════╗       ╔═══════════╗
    ║   BUG     ║       ║  ERROR    ║       ║  CRASH    ║
    ║   [ls]    ║       ║  [grep]   ║       ║  [sudo]   ║
    ╚═══════════╝       ╚═══════════╝       ╚═══════════╝
         |                    |                   |
         v                    v                   v
         
    ╔═══════════════════════════════════════════════════╗
    ║ $ _                                               ║
    ╚═══════════════════════════════════════════════════╝

🐞 Enemy Types

🟥 BUGS (Red)

  • Health: 1 point
  • Points: 10 points
  • Weakness: Level 1 commands
  • Examples: ls, cd, pwd, cat, rm

🟪 ERRORS (Purple)

  • Health: 2 points
  • Points: 20 points
  • Weakness: Level 2 commands
  • Examples: grep, sed, awk, find, ssh

🟨 CRASHES (Gold)

  • Health: 3 points
  • Points: 30 points
  • Weakness: Level 3 commands
  • Examples: sudo, chmod, systemctl, docker

💾 Command Power System

The game features over 100 real bash commands divided into three power levels:

┌─────────────────────────────────────────────────────┐
│ LEVEL 1 - BASIC COMMANDS                           │
├─────────────────────────────────────────────────────┤
│ ls, cd, pwd, echo, cat, rm, cp, mv, mkdir, touch,  │
│ clear, date, whoami, wc, less, more, head, tail... │
└─────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────┐
│ LEVEL 2 - INTERMEDIATE COMMANDS                    │
├─────────────────────────────────────────────────────┤
│ grep, sed, awk, sort, uniq, tr, cut, paste, xargs, │
│ ssh, git, vim, nano, screen, tmux, netstat...      │
└─────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────┐
│ LEVEL 3 - ADVANCED COMMANDS                        │
├─────────────────────────────────────────────────────┤
│ sudo, chmod, chown, systemctl, docker, kubernetes, │
│ apt, yum, mount, fdisk, firewall-cmd...            │
└─────────────────────────────────────────────────────┘

🎯 Targeting System

There are two ways to defeat enemies:

  1. Direct Hit: Type the EXACT command shown on the enemy
  2. Power Hit: Type any command with enough power level

The game will highlight the enemy you're targeting with a cyan border as you type!

📚 Command History Feature

╔═══════════════════════════════════════════════════╗
║  GAME OVER - COMMAND HISTORY                     ║
║                                                  ║
║  $ ls                                            ║
║  Lists files and directories in current directory║
║                                                  ║
║  $ grep                                          ║
║  Searches for patterns in files                  ║
║                                                  ║
║  $ sudo                                          ║
║  Executes a command as another user (root)       ║
╚═══════════════════════════════════════════════════╝

When the game ends, you'll see a special feature:

  • Command Journal: See all unique commands you used during your game
  • Command Descriptions: Learn what each command actually does
  • Terminal Education: Turn your gameplay into a learning experience
  • Command Reference: Use it as a quick reference for bash commands

This feature helps you learn real terminal commands while having fun!

🔥 Difficulty Modes

┌─────────────────────────┐   ┌─────────────────────────┐
│     NORMAL MODE         │   │      HARD MODE          │
│                         │   │                         │
│  Standard speed         │   │  2x enemy speed         │
│  For beginners          │   │  For terminal experts   │
└─────────────────────────┘   └─────────────────────────┘

📈 Progressive Difficulty

The game gets more challenging as you score points:

  • Every 50 points: Enemy speed +15%
  • Every 50 points: Enemy spawn rate +15%
  • Current level displayed at the top of screen
  • Maximum difficulty: 4x starting speed

💡 Pro Tips

╔════════════════════════════════════════════════════╗
║ PRO TIPS FOR TERMINAL DEFENDERS:                  ║
║                                                   ║
║ ★ Focus on enemies closest to the bottom first    ║
║ ★ Learn the most powerful commands for each type  ║
║ ★ Watch for the cyan highlight to see your target ║
║ ★ Use exact matches when possible for precision   ║
║ ★ Try different commands to build your history    ║
╚════════════════════════════════════════════════════╝

🎓 Educational Value

Terminal Defender helps you learn:

  • Real bash commands and their purposes
  • Command categories and power levels
  • Quick typing skills for terminal use
  • Basic system administration concepts
  • Command descriptions and functionality

🌐 Join the Community

This game is available on GitHub! To contribute or fork:

🙌 Acknowledgments

╔═══════════════════════════════════════════════════╗
║  Inspired by Red Hat's Command Line Heroes        ║
║  Created with ♥ for terminal enthusiasts          ║
║  Built with vanilla JavaScript, HTML5, and CSS3   ║
╚═══════════════════════════════════════════════════╝

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published