This is a simple Space Invaders game written in C++ using the SFML library, including possibility of saving to JSON.
Before building and running the game, make sure you have the following dependencies installed:
- CMake (Minimum version 3.12)
- C++ Compiler (g++ or clang++)
- SFML Library (Minimum version 2.5)
- nlohmann/json (3.2.0)
For starter:
sudo apt-get update
Install CMake using the package manager for your system. On Debian-based systems, you can use:
apt-get install cmake
Make sure you have a C++ compiler installed. On Debian-based systems, you can install g++ with:
apt-get install g++
Install the SFML library. Below are the commands for Debian-based systems:
apt-get install libsfml-dev
Install nlohmann/json. To be able to save whole game in JSON file
apt install nlohmann-json3-dev
- Move the player spaceship using the left and right arrow keys.
- Press the space bar to shoot bullets.
- Aim to shoot down the moving enemies.
- Press the P key to save whole game, to be able to resume to it later.