Group Project / Custom Engine

Aliens Stole
My Sh**

Role

3C, Gameplay Programmer

Duration

12 Weeks

Language

C++

Engine

Custom C++ Engine

Reference game

Spyro

Overview

In this project my main focus was on the 3C aspects: Character, Camera, and Controls. In the previous project, the structure caused a lot of issues later on so I wanted to do it properly this time. I removed all of our previous player and camera code and started from scratch.

Camera

Camera System

I developed all of the cameras function in this project and several camera components to handle a third-person adventure game:

Camera Controller Component:

Used for the cameras inputs and states. The states make up what components should be active and affect the camera.

Camera Orbit Component:

The core gameplay camera with adjustable pivot offsets, and smooth interpolation for player tracking.

Camera Assist Component:

A system to affect mostly the orbit component depending on the players state. (How the camera should act when the player is charging or gliding)

Camera Collision Component:

Handles the collision of the camera so the player is always in line of sight.

Camera Cinematic Component:

A system I created where you can create keyframes for cinematic camera events. This is used several times during the game, such as the intro and crewmate cutscenes.

With these components it made it very easy to swap between different states and make the camera behave the way I wanted through a simple interface.

Demonstration of the Orbital Camera and Collision logic in action.

Player

Player System

I developed all of the players features and movement, except for the players jump.

I also made a new system to handle the character of the game:

Player Input Component:

Used for the players inputs. These were saved in a struct that contained information about the current input state.

Player Movement Component:

Handles the players movement. Checks which states the player is in to determine movement behavior.

PhysXPlayerComponent:

Handles the players physics. We implemented PhysX in our engine this project.

Player State Component:

Handles the players states and transitions. These were also saved in a struct. I mainly used three different enums for this. LocomotionState, GroundedState, and ReactionState. This component also kept track of what different abilities were active. ReactionState were used for things like knockback and hitstun.

Player Ability Component:

Handles the players abilities. This component kept track of all the players abilities active or not. It had two containers, one for active abilities and one for all abilities. These containers were vectors of a base class called PlayerAbility. Our three different abilities, Charge, Glide, and FlameThrower, all inherited from this base class. So when this component recieves an input for an ability it tries to activate it by checking what abilities are currently active and if this ability can coexist with them. It also checks the state of the player is compatible with the ability. For example, you can't activate the glide ability if you are grounded.

Trailer

Trailer

Aliens Stole My Sh** — trailer.