Skip to content

MerajDerafshi/Space-Invaders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘พ Space Invaders (C++ Console Edition)

A modern take on the classic Space Invaders built entirely in C++, running directly in the console with colorful ASCII art, smooth menus, and an engaging gameplay experience.

This project comes with a leaderboard, persistent scoring system, easy-to-use controls, barriers, UFOs, and alien waves โ€” everything youโ€™d expect from a true Space Invaders remake.


๐ŸŽฎ Features

  • ๐Ÿ  Main Menu: Start a new game, view the leaderboard, read the how-to-play guide, or exit.
  • ๐Ÿ‘ค Player Profiles: Enter your name before starting, and your score is tracked across sessions.
  • ๐Ÿ”ซ Classic Gameplay: Destroy waves of aliens before they reach your planet.
  • ๐ŸŽฏ Scoring System:
    • Top Row Alien โ†’ 30 Points
    • Middle Row Alien โ†’ 20 Points
    • Bottom Row Alien โ†’ 10 Points
    • Mystery Ship (UFO) โ†’ 50โ€“200 Points
  • ๐Ÿ† Leaderboard: Keeps top scores across players, sorted by score.
  • ๐Ÿ›ก๏ธ Barriers: Use destructible shields for protection against enemy fire.
  • ๐Ÿš€ Spaceship (UFO): Appears randomly for bonus points.
  • โธ๏ธ Pause Menu: Pause anytime and choose to resume, restart, or return to the main menu.
  • ๐ŸŽจ Colorful ASCII UI: Smooth retro vibes with modern console graphics.
  • ๐Ÿ’พ Persistent Save: Player scores are saved in leaderboard.txt.

๐Ÿ“ท Screenshots

๐ŸŽฎ Main Game

Game


๐Ÿ  Main Menu

Menu


๐Ÿ•น๏ธ How to Play

How to Play


๐Ÿฅ‡ Leaderboard (Sorted by Score)

Leaderboard


โธ๏ธ Pause Menu

Game


๐Ÿ† Win

Game


โš™๏ธ Setup & Run

โœ… Requirements

  • A C++ compiler (e.g., g++, MSVC)
  • Windows OS (project uses conio.h and windows.h)
  • Console with UTF-8 and ANSI color support

๐Ÿ“ฆ Build & Run

g++ -o spaceinvaders spaceInvaders.cpp -std=c++11
spaceinvaders.exe

๐Ÿ•น๏ธ Controls

  • A / D or Left/Right Arrows โ†’ Move ship
  • Spacebar โ†’ Fire laser
  • ESC โ†’ Pause game

๐Ÿ“ Project Files

  • spaceInvaders.cpp โ†’ Main source code
  • leaderboard.txt โ†’ Stores player leaderboard data

๐Ÿ‘ค Creator

Name: [Meraj Derafshi]
Contact/Portfolio: [https://github.com/MerajDerafshi]


๐Ÿ“œ License

This project is open-source. Feel free to use, modify, or expand it for learning or fun. Attribution is appreciated.

About

๐Ÿ‘พ๐Ÿ•น๏ธ An advanced C++ implementation of Space Invaders for the terminal, featuring smooth gameplay and extended functionality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages