
Perpetua Insanus
Perpetua Insanus is a game made in Unity, as a project for the Project I university course.
The goal of this project was to develop a full Unity game, along with AI also developed by us.
We decided to implement a Survival Horror game where you play as John Lambert. You are trapped in a mental asylum and must explore and use everything that you can find, in order to escape and survive.
This game and its mechanics were inspired by other games of similar genres, like Resident Evil and Silent Hill.
General Overview
Game Mechanics
Perpetua Insanus allows the player to explore the entire area of the map, which will be drawn in the diary that can be found in the inventory.
The player can heal itself through the use of injections found throughout the map.
In order to have a proper light source, the player must manage the lifetime of its rechargeable flashlight.
The crosshair expands itself when the player can interact with a certain object or add it to the inventory.
As a survival horror genre, different reloadable weapons are available.
Ingame GUI
We wanted to make sure that the GUI of the game was as minimal as possible, so we only left it with the dynamic crosshair, the flashlight battery indicator, and the bullet counter for the gun being used.
We even moved the health state to the inventory tab, where a bloody heart can be checked, and also introduced a constant heartbeat sound that increases its volume as the player's health decreases.
Enemies AI
The game presents itself with Base Enemies and a Boss Enemy.
Artificial Intelligence was implemented in both in order to make them patrol, chase or attack the player, with the Boss Enemy having this behaviour based in a Behaviour Tree and the Base Enemies randomly having it based either in a Behaviour Tree or in a State Machine with Decision Tree for the Attack state itself (given that Base Enemies have both range and melee attacks).
Level Progression Design
In Perpetua Insanus, each level corresponds to a new area of the asylum, and each one will have its own puzzle to be solved.
The player will only have access to a new area after completing the previous area's puzzle.
My Contributions
Level Design
As a team, we always gathered together and considered the game design ideas from every single one of us.
When it comes to the level design, I mainly contributed to the idea for the second area's puzzle and for the final area of the asylum (where the boss enemy awaits).
This second area's puzzle was really interesting to discuss because it made us evaluate between keeping that great puzzle experience for the player and the need to keep the frame rate stable (given that this puzzle presupposed the rendering of different camera views on a good amount of planes).

Guns Mechanics
At an early stage of the game, I set myself working on a side Unity testing scene in order to program the guns' mechanics.
The main focus was to implement recoil, kickback and bullet spread effects.
The combination of these two effects is a coned shaped bullet spread, which increases its pitch rotation the faster the player would shoot.
I made sure it was customizable for each different type of gun (pistol and shotgun), as well as for the remaining options like shooting maximum distance, magazine size, damage per bullet, and shooting & recharging sounds.
I also implemented a gun state controller for when it is playing a reloading animation, a pellet hole creator for when it hits something moveable, a force amount given to the object that was hit, and muzzle flashes from a free package, but all of these last features weren't included in the final build of the game by team decision.
Base Enemies and Boss Animations
I was responsible for both the Base Enemies and the Boss Enemy animations in Perpetua Insanus.
More specifically, the creation of the individual rigs, skin weights, IK handles (to take care of the legs, arms, tail and whiskers movements), cluster deformers (for facial animations), set driven keys (for the toes, fingers and faces), and animation keyframes.
-
Base Enemy: Idle, Walking, Chasing, Feet Attack, Head Attack, Tong Attack, Death;
-
Boss Enemy: Idle, Walking, Attack, Death.
Even though the following two animations weren't implemented in the final build of the game, I also created a Mad Reaction animation for when the Boss would spot the player, as well as a Shrunken Walk animation to make it possible for the Boss to walk through doors despite its size.
Before the animation process itself, I also tweaked the initial 3D model of the Boss so that it could have a more threatening tail, and did the UV unwrapping using different shaders for the different parts of the model so that each of those could have a better texture resolution.
Sound Design
I researched a good part of the sound effects present in Perpetua Insanus.
Regarding the heartbeat of the player, it has 3 different heartbeat frequencies.
Also, the different steps sounds as the player walks are all from different timestamps of the same audio clip, and are played individually according to the distance travelled by the player.
I used Audacity to manipulate each sound effect.