This repository contains a C++ implementation of the classic arcade game "Asteroids" using the SFML (Simple and Fast Multimedia Library).
To run the Asteroids game, follow these steps:
- Clone this repository to your local machine or download the source code as a ZIP file.
- Make sure you have SFML installed on your system. You can download SFML from the official website or install it using your package manager.
- Open the project in your preferred C++ IDE or text editor.
- Set up the SFML library in your project. Refer to the SFML documentation for instructions on how to link SFML to your project. Make sure to link the necessary libraries (SFML, SFML-Graphics, SFML-Audio, etc.) based on your operating system and build configuration.
- Build and compile the project.
If you encounter any issues during the installation process, please refer to the SFML documentation or consult the online SFML community for assistance.
The following controls are used to play the game:
- Up Arrow: Thrust the spaceship forward.
- Left Arrow: Rotate the spaceship counterclockwise.
- Right Arrow: Rotate the spaceship clockwise.
- Spacebar: Shoot bullets.
The objective of the Asteroids game is to score as many points as possible by destroying asteroids and other enemies without colliding with them. The game ends when the player's spaceship collides with an asteroid or enemy spacecraft.
The player controls a spaceship that can rotate, thrust forward, and shoot bullets. The spaceship must avoid colliding with asteroids while shooting them to destroy them. Destroying larger asteroids splits them into smaller asteroids, which are worth more points. Some asteroids may contain power-ups that provide temporary benefits to the player, such as increased firepower or invincibility.
The game features multiple levels, each with increasing difficulty. The player can progress to the next level by destroying all asteroids in the current level.
The source code in this repository is licensed under the MIT License. Feel free to use, modify, and distribute the code for personal or commercial purposes. However, please note that this license does not cover the assets (images, sounds, etc.) used in the game, which may have their own licenses. Make sure to review and comply with the licenses of any third-party assets used in your own projects.
Source: https://www.youtube.com/watch?v=rWaSo2usU4A&list=LL&index=14