Skip to content

fernandodonea/Stardust-Defenders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP Project - Stardust Defenders

A classic-style space shooter game built with C++ and SFML to practice object-oriented programming (OOP). Take control of a spaceship and defend against waves of enemies while trying to achieve the highest score possible.

Game Play

Check the wiki for more details on the project structure and OOP principles used in this game.

Features

  • Player Controls: Control your spaceship using W, A, S, D keys
  • GUI Elements:
    • Score tracking
    • Health bar
    • Game over screen
  • Combat System:
    • Shoot bullets using the spacebar
    • Enemy collision detection
    • Combat scoring system
  • Enemy System:
    • Continuous enemy spawning
    • Different enemy speed and health
    • Collision detection with player and bullets
  • Boss:
    • Special alien boss enemy with laser attack
    • Randomized movement

Boss Gameplay

Installation Guide

The following guide is for setting up the project on macOS and Linux devices. (UNIX-like systems). Support for windows in coming soon.

Prerequisites

macOS

  • A Mac with Xcode installed (for Clang and C++17 support)
  • Homebrew for package management

Linux

  • A Linux distribution with a C++ compiler (GCC or Clang)

Installing CMAKE

Open your terminal and run:

macOs

brew install cmake

Linux

sudo apt-get install cmake

Installing SFML

Open your terminal and run:

macOS

brew install sfml@2

Note: On Intel Macs, Homebrew typically installs packages in /usr/local/Cellar, while on Apple Silicon Macs the default prefix is /opt/homebrew/Cellar.

To get the correct SFML path, you can run:

brew --prefix sfml@2

If neccessary, update the CMakeLists.txt file to point to the correct SFML installation path.

Linux

sudo apt update
sudo apt-get install libsfml-dev

Building the Project

  1. Clone this repository
git clone https://github.com/fernandodonea/Stardust-Defenders
cd Stardust-Defenders
  1. Create a build directory and cofigure the project:
mkdir build
cd build
cmake ..
  1. Build the project:
make
  1. Navigate to the project root again:
cd ..

How to Run the Game

To run the game, execute the following command in your terminal in the project root directory:

./StardustDefenders

About

OOP project: A 2D space shooter built in C++ using SFML. The player controls a spaceship to shoot down enemy ships, avoid collisions, and rack up points in this classic arcade-style game.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors