Technical features of the demo 

Moon Follower - Advanced Game Tech

Overview

A 3D platformer project in Advance Game Technology module at City University London.

I used a custom framework created by the university to make a game in C++. The framework is made with OpenGL and has basic features. 

Gameplay: The frog is the main character. His objective is to reach the final destination to win while avoiding obstacles and enemies. He loses when his health hits 0.

I. Technical features

1. Camera techniques

- Moving the mouse left and right to rotate around the player

- Moving the mouse up and down to create a "look" option (look up/look down)

2. Physics and collision detection for jumping

- Physics: Semi-implicit Euler Integration is used to implement player's jump and fall mechanics. The velocity is updated using acceleration. Then the position of the player is updated based on his velocity. (Image below)

After the player jumps up on air, the acceleration is set to the value of gravity. The result is that the player falls down with the effect of gravity. 

- Collision detection: Velocity and AABB bounding box are used to check for collision between the player and the platform. If a collision is detected, physics values are reset to not apply gravity anymore.

3. AI using Finite State Machine

- Enemy AIs are implemented using finite state machine and state pattern

- There are 2 types of enemy: flying one and shoot one.

Flying type: patrols back and forth a certain distance. If the player gets close, it will start chasing. When close enough, it will attack by punching.

Shoot type: stands at one place and once the player is in range, start attacking by shooting projectiles towards player. If the player tries to approach the enemy, it will dodge away and after that increasing its speed.

The diagram for each is as follow: