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.
- ๐ 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.
- A C++ compiler (e.g., g++, MSVC)
- Windows OS (project uses
conio.handwindows.h) - Console with UTF-8 and ANSI color support
g++ -o spaceinvaders spaceInvaders.cpp -std=c++11
spaceinvaders.exeA/Dor Left/Right Arrows โ Move shipSpacebarโ Fire laserESCโ Pause game
spaceInvaders.cppโ Main source codeleaderboard.txtโ Stores player leaderboard data
Name: [Meraj Derafshi]
Contact/Portfolio: [https://github.com/MerajDerafshi]
This project is open-source. Feel free to use, modify, or expand it for learning or fun. Attribution is appreciated.





