Get ready for a nostalgic journey! This is an epic collection of 16 classic games, reimagined and implemented in C++ with the power of SFML (Simple and Fast Multimedia Library). Dive into pixelated graphics and addictive gameplay that harks back to the golden age of arcades!
Explore our gallery of classics, each with its pixel art charm and unique challenges:
- Tetris - The legendary falling blocks puzzle. Fit them perfectly!
- Doodle Jump - Jump endlessly in this vertical adventure. How high can you go?
- Arkanoid - Break all the bricks with your ball and paddle. A classic arcade!
- Snake - Guide your hungry snake, eat and grow, but be careful not to bite your tail!
- Minesweeper - Uncover the minefield! Mark the bombs and clear the board.
- Fifteen Puzzle - Slide the numbered tiles and organize the puzzle. A challenge for the mind!
- Racing (Top Down) - Go full throttle in this top-down arcade racing game. Hit the gas!
- Outrun - Feel the speed in a classic 3D race. The asphalt awaits you!
- Xonix - Conquer territory, but escape from enemies. Expand your domain!
- Bejeweled - Match 3 or more gems and make them disappear. Sparkle and strategy!
- NetWalk (Pipe Puzzle) - Connect the pipes and complete the network. A plumbing puzzle!
- Mahjong Solitaire - Find the pairs and clear the board. Relax with this oriental classic.
- Tron - Create light walls and surround your opponents. The Tron arena awaits you!
- Chess - The game of kings and queens. Challenge your mind in chess!
- Volleyball - Serve, receive, and attack! A fun and simple volleyball match.
- Asteroids - Pilot your ship, dodge and destroy asteroids. The galaxy needs you!
To embark on this pixelated adventure, you'll need a few tools:
- C++ Compiler (supporting C++11 or later)
- SFML Library (Simple and Fast Multimedia Library)
- SQLite3 Library (for games requiring data persistence)
- CMake (optional, but highly recommended for building)
Getting SFML ready is straightforward. Choose your operating system:
sudo apt-get install libsfml-devbrew install sfml- Download SFML from the official website
- Follow the installation guide for your compiler
Ready to jump into the action? Each game is self-contained and can be compiled independently.
For a quick start, navigate to a game's directory and compile with g++:
cd "01 Tetris"
g++ -o tetris main.cpp -lsfml-graphics -lsfml-window -lsfml-system
./tetrisFor a more robust build process, especially if you plan to build all games, CMake is your friend:
mkdir build
cd build
cmake ..
makeMastering the controls is key to victory! While specific controls vary per game, here are the common patterns you'll encounter:
- Arrow Keys - Movement/Navigation
- Space - Action/Shoot
- Mouse - Selection/Interaction
- ESC - Pause/Menu
For detailed controls, keep an eye on the game window itself or peek into the source code comments!
This project is organized into several modules, with each game residing in its own dedicated directory. Below is a high-level overview of the project's package structure:
.
├── 01 Tetris/
│ ├── main.cpp
│ └── images/
├── 02 Doodle Jump/
│ ├── main.cpp
│ └── images/
├── ...
├── build/
├── cmake-build-debug/
├── docs/
├── scripts/
├── Writerside/
└── README.md
Each game directory (e.g., 01 Tetris/, 02 Doodle Jump/) typically contains:
main.cpp- The main source code file for the game.images/- A directory holding game assets like sprites and textures.fonts/(optional) - A directory for custom fonts used in the game.- Other specific files (e.g.,
shader.fragfor Tron,Connector.hppfor Chess) as needed by the game.
The top-level directories include:
build/andcmake-build-debug/: Directories for build artifacts generated by CMake.docs/: Contains project documentation.scripts/: Utility scripts for various tasks.Writerside/: Related to documentation generation using JetBrains Writerside.README.md: This very file, providing an overview of the project.
A peek behind the pixelated curtain:
- All games are crafted using SFML for seamless graphics, audio, and input handling.
- Some games utilize SQLite3 for data persistence, such as high scores.
- Each game follows a consistent structure, featuring robust game loops, efficient event handling, and smooth rendering.
- Most games boast charming sprite-based graphics, powered by their respective image assets.
- Keep an eye out! Some games might require additional files like custom fonts or unique sound effects to complete the experience.
Want to join the pixel art development team? Your contributions are highly welcome! Feel free to enhance this collection by:
- Improving existing games (e.g., adding new levels, power-ups)
- Adding exciting new features
- Squashing pesky bugs
- Optimizing performance for even smoother gameplay
- Integrating awesome sound effects or background music
This project is open source, just like the best retro games! Please check individual game files for specific licensing information.
A huge shout-out to:
- The SFML Team for providing such an excellent and fast multimedia library. You're the real MVPs!
- The brilliant classic game developers who laid the foundation for these timeless concepts.
- The amazing gaming community for continuous inspiration and valuable feedback.
Now, go forth and enjoy playing these classic games! 🎮