Skip to content

About

Python Based Game

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Star Destroyer 2026 🚀

A retro space shooter arcade game inspired by the classic Starship arcade game. Playable in both the Windows command prompt (Python) and in your browser (HTML/CSS/JS)!

Features

  • 🎮 5 Levels of increasing difficulty with aliens and comets
  • 👾 Green Aliens - Enemy ships that move side-to-side and shoot back
  • ☄️ Red Comets - Incoming projectiles with diagonal trajectories
  • 🚀 Blue Spaceship - Player ship with smooth controls
  • ⚡ Rapid Fire Boost (Yellow) - Doubles fire rate for 8 seconds
  • 💥 Big Bomb Boost (Orange) - Screen-clearing explosion
  • ❤️ 3 Lives per game with invincibility frames
  • 📊 Score System - 10pts per alien, 15pts per comet, level bonuses
  • 🎵 Procedural Sound Effects via Web Audio API (browser version)
  • 🖥️ Retro Terminal Aesthetic with CRT scanline overlay (browser version)

Project Structure

star-destroyer-2026/
├── python/
│   └── star_destroyer.py      # Python CLI game (main executable)
├── cpp_helper/
│   ├── console_gfx.cpp         # C++ DLL for enhanced console graphics
│   └── console_gfx.h           # Header file
├── web/
│   ├── index.html              # Browser version entry point
│   ├── style.css               # Retro terminal styling
│   └── script.js               # Full game logic in JavaScript
└── README.md

How to Play

Python CLI Version (Command Prompt)

cd python
python star_destroyer.py

Controls:

  • ← → Arrow keys - Move ship
  • SPACE - Shoot
  • B - Use Bomb (screen clear)
  • Q - Quit
  • Y / N - Yes / No (for Play Again prompts)

Note: The console_gfx.dll is optional. The game falls back to ANSI escape codes if the DLL is not available.

Browser Version (HTML/JS)

Simply open web/index.html in your browser, or serve with any HTTP server:

# Using Python
cd web
python -m http.server 8000
# Then open http://localhost:8000

# Using Node.js
npx serve web

Controls:

  • ← → ↑ ↓ Arrow keys - Move ship
  • SPACE - Shoot
  • B - Use Bomb
  • Y / N - Yes / No (for Play Again prompts)

C++ DLL Compilation (Optional)

To build the console helper DLL for enhanced graphics:

cd cpp_helper
g++ -shared -o console_gfx.dll console_gfx.cpp -Wl,--out-implib,libconsole_gfx.a

Then copy console_gfx.dll to the python/ directory.

Color Scheme

Element Color
Player Ship 🔵 Blue
Alien Enemies 🟢 Green
Comets 🔴 Red
Rapid Fire Boost 🟡 Yellow
Big Bomb Boost 🟠 Orange
Bullets ⚪ White

Game Mechanics

  • Rapid Fire (F): Catch the yellow 'F' falling from the top for 8 seconds of rapid shooting
  • Big Bomb (B): Catch the orange 'B' to gain a screen-clearing bomb (max 3)
  • Aliens: Destroy all aliens to advance. From Level 3+, aliens shoot back!
  • Comets: Appearing from Level 2+, comets fly diagonally and must be destroyed
  • Levels: Complete all 5 levels to become the Star Destroyer!

Requirements

  • Python: Python 3.6+ (msvcrt module - Windows only)
  • C++: MinGW/g++ for compiling the DLL (optional)
  • Browser: Any modern browser (Chrome, Firefox, Edge, Safari)

License

Free to play and modify! Star Destroyer 2026.

About

Python Based Game

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages