Skip to content

whazami/Asteroids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asteroids

Asteroids is a Star Wars themed remake of the classic game Asteroids, made in C++ with the SFML library. The game engine (bounces and collisions) is coded from scratch. In this game, the player controls a spaceship and must navigate through space while avoiding asteroids and destroying enemy ships.

demo

Installation

To run this game on your computer, you will need to have SFML installed. Here are the steps to install SFML and run this game:

  • Download SFML from the official website here.
  • Select the appropriate version for your operating system and extract the files to a directory of your choice.
  • Download the source code for this game directly from this repository, or by cloning it using the command line:
git clone https://github.com/whazami/Asteroids.git
  • Open the project in your preferred C++ IDE and configure the build settings to link SFML. You can find instructions for linking SFML in various C++ IDEs here.
  • Build the project.

Alternatively, Windows users can test the game by running the Asteroids.exe file, located in the "bin" folder.

How to Play

You can control your spaceship using the mouse and keyboard or a gamepad, here's how:

Move Rotate Fire
Mouse & Keyboard WASD/ZQSD keys Move mouse pointer Left click
Gamepad Left joystick Right joystick Right trigger

The game ends if you run out of lives or if the countdown timer reaches zero.

Troubleshooting

If you compile the source code and you get a black window but no error, you may have to modify the assetsPath constant located in include/Utils/Constantes.h to match your file tree.

The vibration of the gamepad can cause the game to freeze/crash if it is connected to the PC via a wired connection due to underpowering. You can deactivate it from the pause menu or connect your gamepad via bluetooth.

Credits

This game was created by Waël Hazami. Special thanks to the creators of SFML for providing the graphics and audio libraries used in this game.

License

This project is licensed under the MIT license. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages