R-Type

A recreation of the classic arcade game "R-Type"

About this project

A recreation of the first level from the classic arcade game “R-Type”. This project tries to recreate the first level as closely as possible, containing many of the same enemies, upgrades, and level layouts. This was the first project at BUAS and was used to introduce us to C++ game development. Even though this was the first game project that I worked on, I still managed to implement various interesting mechanics, like per-pixel collision, spline-based movement for certain enemies and the FABRIK algorithm for the boss fight at the end of the level.

My contributions to the project

Since this is a personal project, everything has been done by me. A brief list of systems that have been implemented will be listed below:
Recreation of the player and upgrades: I aimed to closely replicate the player mechanics from R-Type into my game. This includes implementing player animations for movement and the ability to charge the weapon. Additionally, I also implemented the player upgrades, known as "the force". When the player first picks up "the force", it will connect to the player's spaceship and act like a shield. If the player picks up more upgrades, better weapons will be unlocked. Wea pon upgrades include shooting multiple bullets simultaneously or firing a laser-like projectile.
Multiple unique enemies: In order to make the game feel as close to R-Type as possible, I recreated and implemented a diverse array of enemies with unique behaviors. This includes some enemies that move very slowly but shoot a lot of bullets at the player, enemies that move along a quadratic bezier spline, turret-like enemies that shoot rockets at the player (and use actual projectile motion for the rocket), enemies that are stationary but shoot at the player depending on their position in the level, etc.
Boss fight at the end of the 1st level:  At the end of the first level is a boss fight which is a recreation of the Dobkeratops enemy from the original R-Type. This boss has a unique attack and a lot of health, therefore making it hard to defeat. In order to recreate the tail from the original boss, I decided to do some research into FABRIK, which is an algorithm for solving inverse kinematics problems. 
FABRIK implementation for the tail: The tail is composed of smaller spheres (or tail segments), which are controlled using the FABRIK algorithm. With FABRIK, only the end piece of the tail needs to be moved, and the other tail pieces follow suit. This approach allows for the setup of various movements on the final tail piece, such as direct movement towards the player or using multiple sine waves. As a result, the tail moves in interesting patterns and making the boss more challenging.
Multiple types of collision: In this project, various objects such as level tiles, the player, and enemies, can have different collision types. These different collision types are configured individually for each tile within Tiled, the 2D editor that was used to create the levels. All the different collision types mentioned below can interact seamlessly with each other, which means that, for example, sphere collision and AABB collision will properly collide. 
AABB collision: Rectangular objects, like the player, can use AABB collision. The size of the AABB can easily be changed for each object. 
Sphere collision: Spherical objects, like flying enemies and powerups/pickupables, can use sphere collision. The radius of the sphere collision can easily be changed for each object.
Per-pixel collision: For more detailed objects that cannot use AABB or spheres for accurate collision detection, per-pixel collision has been implemented. This is used for detailed level pieces and allows for accurate detection at the pixel level. Since levels are quite small, and since this is only checked between the player and specific level tiles, it is feasible to do this without any major performance impact. 
image A screenshot of the boss fight at the end of the 1st level.

Quick overview

Project Type:  Game Project
Platform:  Windows
Tools:  C++
Role in Team:  Programmer
Project Duration:  6 weeks
Release Date:  November 5, 2021
Team size:  1
Role in Team:  Engine programmer and Lead