top of page

3D Combat Game

This 3D combat game project builds upon the animation toolkit I previously developed, leveraging its animation features to drive responsive and dynamic character movement. On top of this foundation, I integrated key gameplay systems including a third-person camera, input handling, physics, and a modular damage system. The result is a cohesive combat experience that connects gameplay mechanics with fluid animation for immersive player control.

Keybinding

Camera Spring Arm ensures responsive camera movement by dynamically adjusting the camera's position relative to the player on the "arm". The camera maintains a set distance from the character while performing raycasts from the character to the camera and collision checks to avoid camera clipping through environment. When an obstacle is detected the arm shortens to keep camera in clear view.

Keybinding.gif

Keybinding is stored in an external XML file and is overwritten everytime the player leaves setting page with keybinding changes.

image.png

Input System

A combat game requires more than simply detecting a button press and do stuff. Two advanced input system are introduced to the game to make controls feel more forgiving and responsive.

Input Buffering:

In games, input buffering allows players to press a button slightly before an action becomes available, and the game will store that input for a short window of time. Once the action is ready, the buffered input is executed. 

When a button is pressed, the input system also records the time of the button pressed and stores it as the button's state. And when the game is detecting for button input for actions it detect the latest button input within the given threshold, in this project it is 400ms.

Input Grace Window:

Input grace window allows the game to take near-simultaneous inputs as if they were pressed at exact the same time. This is especially useful in combo system or special moves that requires multiple button press to trigger.

The game tracks the press time of a group of given buttons and calculate the elapsed time between the earliest pressed button and the lastest pressed button. If the difference is smaller than a given threshold (100ms in this project), those buttons are considered to have been pressed simultaneously.

This can also be combined with input buffering by additionally checking if the earliest input is still within the input buffer threshold.

Attack and Damage System

Attack and damage system are responsive for handling combat between characters. Attack system ensures the successful attacks take effect only once on each hostile actor hit. And damage system allows complex damage types such as elemental damage and negative effects.

image.png

Camera Spring Arm

Camera Spring Arm ensures responsive camera movement by dynamically adjusting the camera's position relative to the player on the "arm". The camera maintains a set distance from the character while performing raycasts from the character to the camera and collision checks to avoid camera clipping through environment. When an obstacle is detected the arm shortens to keep camera in clear view.

CameraArm.gif

Credit:

  • Paladin(player character) model and animations sourced from Mixamo.com, by Adobe

  • Boar model and animations sourced from Monster Hunter Rise, by Capcom

  • Environmental Assets sourced from Monster Hunter Rise, by Capcom

  • UI Asset sourced from Monster Hunter Rise, by Capcom

bottom of page