This is a simple 2D game using the SFML library.
AlienGameDemo.mov
- Operating Systems: Windows 10+, macOS Mojave+, or a recent Linux distribution (e.g., Ubuntu 18.04+).
- Development Tools: GCC, Clang, or MSVC; SFML 2.5+; CMake 3.15+.
- IDE Recommendations: Visual Studio 2019 (Windows), Xcode (macOS), Code::Blocks or VSCode (Linux).
- Minimum: 1 GHz CPU, 2 GB RAM, integrated graphics, 100 MB storage.
- Recommended: 2 GHz CPU, 4 GB RAM, dedicated GPU with OpenGL 3.0 support, 200 MB storage.
- No internet connection required for gameplay.
- Performance may vary outside these specifications.
Before you begin, ensure you have the following installed:
- SFML (Simple and Fast Multimedia Library) for graphics and window management.
- A C++ compiler, such as GCC, Clang, or MSVC.
- CMake to build the project.
-
Clone the Repository:
git clone https://github.com/beaamoo/2D-Game.git cd 2D-Game
-
Build the Game:
mkdir build cd build rm CMakeCache.txt rm -rf _deps cmake .. make
- Run the executable generated in the
build
directory:./2D-Game
-
Start the Game:
- Upon launching, you'll be greeted with a welcome screen.
- Press any key to begin your adventure.
-
Game Mechanics:
- Use the arrow keys for navigation and interaction within the game.
- Engage with different elements and challenges presented.
-
Objective:
- The game's objective will vary depending on the current level and challenges.
- Complete tasks, solve puzzles, or reach certain points to progress.
-
Quitting and Restarting: At win or gameover state:
- Press 'Q' to quit the game.
- Press 'R' to restart the game.
To ensure the reliability and correctness of our 2D-Game, we have implemented a robust testing strategy using the Google Test framework. Our tests are designed to cover critical functionalities of the game, focusing on various aspects including coordinate calculations, game mechanics, and collision detection. This approach helps us maintain high code quality and game performance.
After building the project, you can run the tests by following these steps:
Navigate to the Build Directory: Change to the directory where your game is built.
cd build
./coordinate_test
Our testing suite includes a variety of test cases to ensure comprehensive coverage:
-
Coordinate Calculations: Tests the accuracy and reliability of coordinate transformations and movements, crucial for the game's spatial logic.
-
Game Mechanics: Evaluates the initialization, state transitions, and updates in game mechanics to ensure consistent behavior under different scenarios.
-
Collision Detection: Validates the detection of collisions between various game elements, a core aspect of game dynamics.
As the game evolves, we regularly update and expand our tests to include new features and scenarios, ensuring ongoing stability and performance.
We welcome contributions! If you have ideas, bug fixes, or improvements, feel free to fork the repository and submit pull requests.
This project is open-source, licensed under the MIT License. See the LICENSE.md file for more details.
Get ready to soar through the stars in this 2D-Game, as you help Larry the Alien refuel his space ship! 🌟🎮🚀