top of page

ESCAPING THE MANSION OF NIGHTMARES

ROLE(S)

Programmer, Designer, Artist (of collision)

PROJECT DESCRIPTION

A 4 week project during PSQ's specialization-course, with focus on improving my understanding of AI, pathfinding and a bit of gameplay. I downloaded the models and animations from mixamo and made the collision-world and some props in Maya.

GAME DESCRIPTION

Amy is trapped in Mr. Whiteclown's mansion, with the exit locked by some weird contraption. Collect all the keys to unlock the exit and escape without getting caught.

YEAR

2022

GENRE

Third person horror/escape game

PLATFORM

PC

ENGINE & LANGUAGE

TenGine, C++

TECH TAGS

AI, Pathfinding, FSM, Gameplay

MONSTER AI

The gist of
"The Monster"

The Monster, or as his 3D-model is named: Whiteclown, is a Finite State Machine-driven AI who roams his mansion in hopes of finding the escaped live sample (you).

The Monster will patrol around the Mansion, briefly stop to scout an area, break open hiding spots, give chase upon detecting you, and once he catches you, you'll lose unless you clear the QTE.

TheMonster.PNG

Whiteclown by N. Hallin on Mixamo

Patrolling Behaviour

Being very cautious, the monster knows that somehow a research sample has managed to stay alive. That's why he patrols around, scouting his mansion and looking for the survivor. Should the monster happen to see or hear you, he will pause for a brief moment to confirm his discovery, followed by a relentless chase.

MonsterAI_PatrolBehaviour.gif

The Monster reaching his patrol-point and scouting the area

The monster utilizes two states in order to patrol around the mansion. First off, the Patrol-State: The Monster traverses the environment with the help of a grid system, where the A* pathfinding-algorithm is used to find the optimal path to the current patrol point. The second state used for patrolling is the Scouting-State, which The Monster will stand still in and look around. This state is entered when the current patrol point has been reached. If The Monster sees or hears you during these two states, he will first be unable to believe his discovery, pausing for a moment, before starting to execute one out of his two Chasing behaviours, depending on the way you were discovered.
 

MonsterAI_SeeingPlayerLogic.PNG

Vision code - determines if the player is currently being seen

ChaseBehaviour.gif

The Monster chasing the player

Chasing Behaviour

Relentlessly, The Monster will follow you as long as you can be seen or heard. This means that rounding the corner of a hallway, going into another room or hiding somewhere doesn't make you completely safe, you also have to make sure to stay quiet. Should the monster reach your last detected position without seeing you, he will look through nearby hiding spots to try and find you.
 

MonsterAI_ChaseSoftV2.gif

The Monster in his SoftChase state

Soft Chase

Triggered if you enter the Monster's field of vision but quickly leave it again. In this state, the monster will walk briskly to your last seen location and attempt to confirm his suspicions that he saw something. If the Monster sees or hears you while in this state, or if you didn't quickly leave his field of vision after he saw you initially, he will enter his Hard Chase-state.

 

MonsterAI_ChaseHardV3.gif

The Monster in his HardChase state, also showcasing the search behaviour

Hard Chase

Triggered if the monster sees you for long enough or if he detects you while in his Soft Chase state. While hard chasing, The Monster will run towards your most recent detected location, based on where he saw you or where you last made a loud enough noise for him to hear. If he comes close enough, he'll extend his hand for a grab, executing his Attacking-behaviour. This triggers a Quick Time Event, which lets you survive if you successfully clear it.

 

GAMEPLAY

Win condition

The exit for this mansion has been locked by some weird contraption and you'll need to gather all the keys to unlock it. This is not an easy endeavour, as The Monster is not willingly going to let a live sample get away. You'll have to duck, take cover and hide in order to avoid his vision; sneak, walk and run to move around in a timely manner while not generating too much noise, or he'll hear you. The keys are heavy and will slow you down while carried, so you'll have to be tactical with your movement to not draw too much attention.

GamePlay.PNG

Concept image of player placing a key into the contraption

Gameplay_MovingAndNoise_V2.gif

Different ways of movement generate different levels of noise

Moving & Making noise

Walking, sneaking and running are different ways to move, which also produce different levels of sound. Walking is decently fast, but leaves you visible and causes the old boards of the mansion to creak. Sneaking makes you able to take cover behind furniture and makes almost no sound - but you move very slowly. Running is fast but loud. Making sound is bad when you're in unknown territory, as others can use it to descern your location.

Hiding

Around the mansions are hiding spots that allow you to become undetectable; saving you both from the Monster's gaze and preventing you from moving - thus preventing you from making sounds. Hiding spots can be entered even if you are carrying a key, however, hiding might not always be the best option. Should the Monster see you enter a hiding spot, he will immediately rush to it in order to rip you out. Opening a hiding spot will also generate a noise, which attracts the Monster's attention if he is close enough.

Gameplay_HidingSpotted.gif

Attemping to hide while being chased

Gameplay_QTE.gif

Successfully escaping after getting caught

Quick Time Events

Currently there is only one QTE in the game which occurs when caught by the Monster for the first time. Inputting all the keys correctly will stun The Monster for a short while, letting you run away. Should you fail, death awaits you. I plan to revisit this project and add more types of QTEs, some of which will trigger different events arount the mansion. I also have plans to make real skillchecks when picking up the keys, in order to create some more interaction.

bottom of page