top of page

Trailer

itch-ioLogo.png

Check the game out!

githubLogo_edited.png

Game's repository

Perpetua Insanus is a survival horror game inspired by the likes of Resident Evil and Silent Hill, focusing in exploration and puzzle solving.

Concept

Perpetua Insanus is a survival horror game in which the player needs to explore its environment to find out not only resources that help him to stay safe but also the keys needed to advance.

Level Design

The map in this game is actually just a little of what we wanted it to be. With 3 months of development we had to cut it down so that the quality of the environment would stay as we wanted. With that in mind, we also made the map looping on itself so that it would feel like a real hospital floor and not a linear one.

Player Interactions

In this game the player can interact in several different ways with the environment: dragging doors, drawers, pick ups...

Since more interactions could be added and the game could be expanded, we needed a solid base code in which would allow us to expand without needing to modify the foundation every single time. For that I implemented interfaces from which we could make the dependencies abstract instead of concrete so that any new interactable behaviour only needed to implement the respective interface with their own logic.

Inventory

Being able to pick up and store items was one of our most important mechanics: keys, syringes, clues for puzzles, weapons.... we had lots of items(and their quantities) and there could be a lot more added, so, just like the player interactions, I implemented a code structure capable of handling expansion without ruining its foundation while also being good performance wise, being aproximately O(1) (C# Dictionaries). 

InventorySystemDiagram (1).png
RaycastSystem.png

Hierarchies

Having all these objects and weapons in mind, I designed and implemented hierarchies that allowed for abstract dependencies on interfaces or abstract classes which allowed the expansion of such systems 

WeaponsHierarchy.png

Since this game was made in Unity Engine, I also wanted to take advantage of some of its functionalities, so the "item hierarchy" was only a class that implemented some interfaces with serialized fields which could be dragged and dropped in the inspector, making it a very generic one.

ItemClass.png

AI

The enemies in this game have their AI implemented in two different ways for academic purposes:

State Machine with Decision Tree:
StateMahineEnemyAI.png
Behaviour Tree:
BehaviourTreeDiagram.png

These implementations were all based in abstract classes from which the more concrete behaviours can just inherit from them and implement their own concrete logic. This way the code can be reutlized in other projects by being very generic and flexible! (The decision tree used was pretty simple and could be made with an if statement but since I implemented the abstract classes I used them to showcase their potential)

What did I learn?

  • Structuring Code Diagrams/Logic

  • Using Events to separate Logic from UI 

  • Structuring Hierachies

  • Using Interfaces/Abstract Classes to make abstract dependencies and not repeat code

  • Using Guard clauses for cleaner code

  • Structuring State Machines

  • Structuring Decision Trees

  • Structuring Behaviour Trees

  • Pathfinding  Algorithms (Dijkstra and A*)

  • Code Optimization

bottom of page