Saturday, June 1, 2024

Resident Evil Prototype Game

Download

PDF version | Unity Build

Introduction

Game Documentary

The game is a recreation of Capcom Resident Evil game mechanic.

Player/Enemy/Actor Component

For both Player and Enemy use simillar design as follow.(Link)

Player Attribute

  • Player have 3D movement
  • Player can't jump
  • Player have 4 weapon (knife,pistol,shotgun,skorpion)
  • Player can perform knife attack
  • Player can change the primary weapon between pistol,shotgun and skorpion
  • Player can aim

Enemy Attribute

In this project there are 3 different types of enemy.

  • Windmill Enemy
    • For windmill enemy is more aggressive and have much bigger detection range
  • 3 Pair Enemy
    • The Pair enemy is the basic enemy. It will roaming around the map
  • Big Tree Enemy
    • The big tree enemy is less aggressive and less detection range as long the player does not disturb the enemy

Game Mechanic/Design

The following is a simple explanation of how the gameplay is implemented.

Enemy Detection

The enemy has 2 radius of detection, far and near radius. Both radius have a degree of detection arena, if the player enters on that area it will increase detection value. If near it will increase much faster. When the detection value is completed enemy will engage with the player

Player Aim Mechanic

  1. When the player presses aim, the animator will play "Atack_EquipGun". This animation will play an animation where player pull the gun for the holster.
  2. When the state enter attack aim, a boolean will set true where the player ready to fire.
  3. If the player presses fire the animator will play "Attack Fire". A function will also handle other requests such as fire particles, dust and smoke. Other functions will also be such as input pulse, camera shake etc.
  4. When the player releases the aim button,the animator state will enter the "Attack_UnEquip" state. This animation where player put weapon back to the holster
  5. Finally the function is completed, where it enters "Anim_Enter" where there is no animation. The main base layer animation will override other animation

Hitbox Handler

Player midst of attack animation Attack animation frame

Simple explanation on how hitbox work.During the 9th frame, it has an animation event request for knife collider/hitbox to be active. When the collider/hitbox is active it will check if it contacts any hurtbox. If it hit it will trigger the attack process and send information(damage,location,direction) to the enemy. Thus enemies will play animation based on the direction/location and update their health. 12th frame there is another animation where the knife collider/hitbox will turn off.