
Psych Out

OVERVIEW
Psych out is a 3D escape game. The game creates a tense atmosphere and experience for players through the scenes and interactive voices of mental hospitals.
In Psych Out, the player assumes the role of a trapped person and collects items in the game environment to escape. The game tests players’ time management skill and ability to observe and collect items manually in a scary setting while allowing them to explore further on their own.
Game Summary
The game was designed using the Unity3D engine and coded in C# scripting language.
The project involved
-
building the scene in Unity3D
-
designing the UI interface
-
creating scripted animations
-
designing player movement and camera tracking
-
devising an Event System to respond to events
Functional Requirements Analysis
The functions requiring implementation in this project included the UI interface design, player movement, animation settings, key collection system and event interaction system.
-
UI interface design. Three functions are implemented: scene jumping, providing helpful information and exiting the game.
-
Player movement. Player movement is controlled by the keyboard’s W, A, S and D keys.
-
Animation settings. Scripted animations are set up for the main interactive props.
-
Key collection system. Stores the collected keys and displays them on the main interface.
-
Event interactions system. Controls interaction between the character and items through keyboard commands and mouse clicks.

Game Design
Game System (Loop) Logical Design

This project focused on the design of two scenes: the initial scene and the game scene. The initial scene features three main buttons: one to start the game (Play), one to exit the game (Quit) and the About button. Clicking Play takes the player to the game scene, clicking Quit closes the game entirely and clicking About pops up a panel with help information, allowing players to obtain detailed information, such as game rules, by themselves. A Back button returns players to the initial scene interface.

Storyline
In Psych Out, the protagonist has been kidnapped and trapped in an abandoned mental hospital, where the protagonist is guarded every day and has no chance to escape. On this day, the guard is called away and leaves temporarily, giving the protagonist a brief opportunity to escape, but the guard has locked the gate before leaving. The gate has a special lock that requires five keys to open. In addition to the guards who have keys, there are five spare keys scattered about the hospital. The player must find the five hidden keys within five minutes to open the gate and escape, thus earning the victory. Players begin in the lobby on the ground floor of the mental hospital. Various clues lead players to understand the current situation and begin looking for boxes holding the five hidden keys. Only by finding the keys can they escape before the guard returns.
Mechanism design
-
Game length: five minutes
-
Player goal: escape from the asylum
-
Game props: doors, treasure chests, keys
-
Rules of the game: Players use the W, S, A and D keys to move, the E key to control the opening and closing of doors and the mouse to control the camera’s point of view and pick up nearby items or props and put them into the key collection system. Within five minutes, the player must find five keys scattered around the hospital, open the gate on the ground floor and escape the hospital to win the game. Players lose the game if they fail to find the keys and escape within five minutes.
Detailed Design and Implementation
Scene building
UI design of the initial scene
A simple UI interface was designed in the initial scene by first adding a canvas to the scene, after which the background panel was created and the Start, Quit and About buttons added. Players click Start to switch to the game’s main scene and begin the game, Quit to exit the game and About to launch the pop-up information panel, allowing the player to review the rules and playing methods to better participate in the game.


UI design of the initial scene
Most of the 3D models of the game’s scenes were built with resources from the Unity Asset Store. The floor was made by drawing terrain, and the spare area for the mental hospital was designed and left for future development. The game’s action occurs mainly indoors, so little time was spent on terrain creation. In the main game scene, the outdoor lighting is dim to create a chilly, scary atmosphere, and a moody soundtrack begins playing at the start of the game. To provide an immersive experience for the player, the game scene’s UI design is simple, featuring only a countdown timer and an indicator of the number of keys.



Item and Prop Design
Object and prop animation settings
In the game scene, animation of opening and closing the doors and gate was added. Generally, there are two ways to open and close a door. The first involves creating an animation of opening the door in the animation panel and then writing a script to play the animation when characters enter the trigger range. The second, which is used in this game, involves using scripts only. When people enter a door’s trigger range, the door swings 90 degrees from the initial state to open. In this project, the first method was employed to realise the animation.

Character Movement
The movement of characters is controlled by the Transform component, which controls three main elements: position, rotation and scale. The position movement of the characters can be simulated by controlling the X, Y and Z values of position, and the rotation angle of the characters can be changed by controlling the X, Y and Z values of rotation. In this method, one creates an empty object, names it Player and then adds a capsule to the Player. The movement is realised by writing a script of character (Player) movement. The main code is shown in the following figure.

Camera Tracking
When a player moves, the camera is required to follow the pointing of the mouse to simulate a first-person perspective. To do this, one drags the camera under the game object Player, makes the player its parent and adjusts the camera position so that, when the player moves the mouse, the field of view of the camera moves with it.
One must first customise a function Cam_Ctrl_Rotation() to obtain the values of the mouse’s X axis and Y axis movements, after which one uses Transform to make the camera move and rotate with the mouse’s X axis and Y axis. Finally, this function is called up using the LateUpdata() method, and the camera moves and rotates with the Player. The main code is shown in the following figure.

Clue Cues
When there are only 45 seconds left in the countdown, a clue reminds the player to pay attention to the time. A text was added to the canvas, and the prompt information in the text was recorded. A code was added to the player script. When the time remaining is less than 45 seconds, the prompt message appears, disappearing after five seconds. The code is as follows.

Event System
The Unity game engine provides a complete event response system that users can employ to realise the required functions. For example, on the game’s initial page, the details of the gameplay will pop up when the player clicks the About button. Another button and panel can be added to the canvas to display information, such as game rules, by creating a new script and adding it to the canvas. The specific code is shown below.

Game Experience and Testing

The player opens the game file, and the game loads and displays the initial interface with creepy, atmospheric background music. All three buttons on the interface have a feedback effect, with the opacity of the buttons changing when the mouse hovers over them and when they are clicked, enhancing the user experience

The player clicks the About button to view the rules of the game and the background of the game’s story.

After getting a introduction of how the game is played, the player clicks the Back button to return to the initial page and then clicks Play to enter the game and begin the experience.

The time displayed at the top of the screen begins to count down. The protagonist’s vision gradually clears, and he sees a large gate, but it does not open when he presses button E. Remembering the rules, the player surmises that the five keys must be collected to open the gate.



The protagonist begins to walk through the scene, his footsteps prominent in the empty chamber, which is so quiet that one could hear a pin drop. He pushes open a creaking door that seems to lead to the doctor’s office. The items in the room are very old and dusty. He looks around for the box containing the key and finds the first key nearby. The first key lights up on the screen’s key indicator, and the protagonist closes the door and continues on his way.


Time passes, and the timer indicates that the guard is about to return. The protagonist grows anxious; if he does not find the keys, he will lose this chance to escape.

Eventually, he finds the last key in another room and hurries down the stairs. The door opens, and he is thrilled to be free at last.

Running Video

Reflection and Improvement
Developing Psych Out presented challenges as described below.
1. When designing this experience, I was once troubled by the script of opening the gate, as victory is achieved when the player successfully opens the gate to escape within the specified time. However, besides the gate, there is also a room door in this scene. Distinguishing the different doors in the code presented a big problem in the production process. Finally, I created a Boolean value and distinguished the doors by changing the Boolean value in the property panel of the doors.
2. I tried to dim the indoor lights, but, when I hid all the light sources, there were still lights in the terrain. I tried many methods, but this problem remains unresolved. I suspect that the light was inadvertently baked onto the terrain during the making of the terrain.
3. This game project is a single-player game and does not take networking into account. Currently, online games have a promising future, and players prefer to work together to complete a game. The above concerns are shortcomings in this game project but suggest directions for my future work.
Generally speaking, the game’s environment provides a horrifying, gloomy atmosphere. Especially when players walk through the hospital, the prominent footsteps, creaking door, pills scattered on the ground, bloody handprints on the wall and characters’ shadows cast on the wall add a frightening element to the environment.
However, this is not enough, as there are no other obstacles, such as an enemy’s attack, when the player is looking for the keys, although players may experience nervous emotions and feel some excitement upon winning the game. For improvement, I will consider keeping the environment in darkness, giving players only a torch to see the scene in front of them, which will add a frightening element of mysterious darkness.
Additionally, I will add zombies or other supernatural enemies to the environment and, at the same time, limit the player’s capacity to attack; for example, the player may have only a dagger. Such constraints on the players will make the experience more challenging. In the aspect of user experience, I will improve the UI panel, so that players can have an immersive experience of the game, and some feedback is given to the staged victory of the players during the game.