Skip to content

Mateusz00/Space-Invasion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Space Invasion is a vertically scrolling shoot 'em up, written in C++ without using any existing game engine. This was my first bigger project and my main goal was to gain experience in OOP, which isn't possible with smaller applications. This also was main reason why I chose to avoid using ready-made solutions such as game engine, GUI library. Main goal of the game is to clear all levels and get highest score possible. Game can be downloaded here.

Features

  • Save & load system.
  • Dynamic key binding system.
  • Local co-op (2 players).
  • Pause state.
  • Highscores.
  • Pixel perfect collision.
  • 40 types of enemies and 6 levels and more can be easily added by modifying xml files.
  • 6 types of attacks that enemies can use (StraightLine, Aimed, Homing, Spiral, Orbiting, Barrier).
  • 4 types of power ups.

Implementation details

  • Collision detection is divided into two phases:
    • Broad phase collision detection using AABB Tree, in this phase we check which objects can possibly collide against each other, this phase is meant to be fast and can give false positives.
    • Narrow phase collision detection using pixel perfect collision, in this phase we check which collision pairs are really colliding.
  • Attacks consist of attack phases which can have other nested phases. Attack phases can be either implemented in the same file they are declared or referenced (To avoid duplicating common patterns).
  • Most of the game data is loaded from xml files in order to allow users to easily modify game content to match their preferences.

Demo

Demo gameplay Demo menu

Credits