/Game_4-Aircraft_Shooter

About This is my 4th game for my portfolio. This project is written on C++ with SFML. It's an aircraft shooter with the camera above the player. You can control an airship, shoot enemies with two different kinds of projectiles, collect pickups and finish the level. The game has a title screen, main menu, settings menu, and pause menu.

Primary LanguageC++

en ru ua

Overview

This is my 3rd game for my portfolio. This project is written in C++ with SFML. It's an aircraft shooter with a top-down camera. You control an aircraft with WASD keys (by default). You can shoot bullets and missiles (keys SPACE and M by default). Bullets fly straight up, missiles try to find an enemy aircraft and fly toward it. Every aircraft has health points (even yours). Your aircraft has a finite number of missiles. There are two types of enemy aircraft: the first one can shoot bullets, and the second one just flies. Enemies appear on the top of the window and fly down. If you run into one of the enemy aircraft, they'll be destroyed, but you'll get hit. Your goal is to reach the end of the level (you'll see a finish line at the end of it). If your health points fall below 0, you'll lose the game. The game has a few states - title screen state (the first one you'll see), main menu state (with items "Play", "Settings", and "Exit"), settings menu state (where you can bind keys with actions), game state (where you play actually), and pause state (press ESCAPE, when in the game state). When enemies are destroyed, they might drop pickups with a 33% chance.

image

Game controls:

Arrow left -> Move aircraft left
Arrow right -> Move aircraft right
Arrow up -> Move aircraft up
Arrow down -> Move aircraft down
SPACE -> Shoot bullets
M -> Launch missile
ENTER -> Select menu item
ESCAPE -> Pause game

How to create and build this project in Visual Studio?

  1. Download this repository as a .zip file and extract it:
    image

  2. Create an empty C++ project in Visual Studio:
    image

  3. Open the project's folder in File Explorer and move all files from the archive into it:
    image

  4. Now you have to include these files to your project. At first, to make all those files visible in your project, click the button "Show all files" in Solution Explorer. After this select them, RMB on them and click "Include in Project":
    image

  5. In Project's Properties first set binaries location:
    image

  6. Connect SFML library to the project. Let's start from "include" folder. Go to the "C/C++" tab, find "Additional Include Directories", press the arrow on its right, and click "<Edit...>":
    image

  7. Now do the same with "lib" folder: go to the tab "Linker", find "Additional Library Directories", press the arrow on its right, and click "<Edit...>":
    image

  8. Almost done. We only need to add .dll files to our project. Save your changes by clicking the "Apply" button at the bottom of the project's properties, change the configuration to "Debug", go to "Linker" -> "Input" tab, find "Additional Dependencies", click the arrow on its right, and click "<Edit...>".
    In the new window write the next lines:
    sfml-system-d.lib
    sfml-window-d.lib
    sfml-audio-d.lib
    sfml-graphics-d.lib
    sfml-network-d.lib
    and press "Ok" button.
    Do the same with "Release" configuration, but remove "-d" prefixes:
    image image

  9. Now you can compile the project.