The Haunted – Kinect / PC – Unity 3D

Posted: April 23, 2014 in Game Concept, Game Design, Game Development

game icon The Haunted Role: Artist, Animator, Programmer, Game & Level Designer, Producer, Sound Editor, Cook 001 Overview This is a survival horror game which goal is to escape the Haunted House while avoiding the angry ghost that haunts it. The only tool used in this game is a flashlight which has a limited use. There is also a fear factor in the game where during extreme darkness or in the presence of the ghost, the character will feel anxiety and affects his vision and sanity, and then eventually leads to mental breakdown.


Puzzles & interactive objects

Object Interaction Result
Music Box Play crank until song ends Acquire key
Paintings Lit light stands in order Open Vault
Library Books on shelf door Interact with secret door Open library secret door
Broken Brick wall Kick wall to reveal path Reveal path to basement
Wooden bridge Jump Survive broken wood
Closet Open Reveal safe combination
Safe Enter key to open Acquire Storage Room Key
Box puzzle Lift box &drop it to correct mark

Interactive objects Music Box music box

  • If the crank is in possession, the next event will follow
  • Touch the crank by doing the reach gesture
  • Listen to the song until the key is released
  • After the song reaches a certain point, a note and a key will be revealed

Light on Paintings 013

  • Touch light stands to turn it on or off
  • Lit the light stands in order
  • Turn the lights of the paintings in this order: Youngest to Oldest
  • (from 2.fetus, 4.child, 5.teen, 3.adult, 1.old woman)
  • The 4th painting will fall down and a secret safe will open when the paintings are in the placed in the correct order
  • If the order is incorrect, nothing happens and the paintings remain on the last position they were placed.

Library Books on Secret Shelf Door 007

  • Touch the weird shelf to open it
  • door remains open when completed

Broken Brick Wall wall

  • An instruction to kick the window will appear
  • Do a kick gesture to destroy the wall
  • The path is revealed when done.

Wooden bridge (2nd floor corridor) bridge

  • Quickly do the Jump gesture while moving forward to prevent falling

Shaking Closet 012

  • If you have the closet key, touch the closet to open the closet
  • if you don’t have the closet key, the closet will just keep on shaking
  • The ghost will suddenly come out the closet and a note inside reveals the solution to the light puzzle

Controls

Action Kinect PC
Move Forward hud_walkPut right foot forward W
Move Backward hud_backPut right foot backward S
Turn hud_turnTurn shoulder left or right Mouse Look
Jump hud_jumpJump in place SPACE
Crouch hud_crouchBend upper body forward C
Stand from Crouch Return to normal posture C
Kick hud_kickKick using RIGHT foot Mouse1
Interact hud_interactRaise right hand Mouse1

Flashlight Flashlight Flashlight provides an abundant but limited source of light. The intensity level or brightness of the light will deteriorate as the battery runs down. Turning the flashlight off saves some battery life but risks triggering fear. The battery stages of the flashlight deteriorates over time of use Battery Life = 100% -1% Battery life over time. Light Intensity goes down as the battery life is diminished until empty


Fear & Sanity During absence of light or in the presence of the ghost, the character will experience fear or anxiety. This is indicated by the heartbeat where as it goes faster, it leads to worse conditions such as mental breakdown — which is equivalent to death or failure. Sanity serves as the player’s HP in the game. When your sanity falls to 0, its game over. Sanity is reduced when in fear, and is replenished when the threat is gone. Total sanity is 100 Fear is triggered upon encounter with both factors such as total darkness or the presence of the ghost. Within the first 3 seconds exposure to total darkness, fear is activated. Fear value goes from 0 – 100 when triggered Upon reaching 100, Sanity goes down. When the fear factory is remedied or avoided (avoided ghost, found a light source), Fear value is reset to 0.


Mother Ghost 017 The Ghost spawns randomly on different parts of the house. Once spotted, the ghost will start chasing the player. While the ghost is in range with the player, the player’s fear increases and sanity goes down, leading to death. 010 004 016 018 The Ghost appears randomly in the house at every 30 seconds for as long as it doesn’t spot the player. Once the player is spotted, it will not disappear until the player loses it.


Fail / Death If the player dies, he will be redirected back to the starting point


Story Harry, a cargo truck driver, is on his first day of duty. He’s driving on the route below the mountains of Cristobal. Mt. Cristobal has been made popular with the strange stories and myths about it being the devil’s mountain. He saw a lone house standing near the foot of the mountains. He saw some light flickering on its window. Harry was going around 100-120 kph on the highway when suddenly, a woman was in front of his truck. Harry hit the breaks and his truck crashed on the road and he suddenly lost consciousness. Harry went on a strange dream where he is inside a burning house with strange screaming and crying voices ending up with him lying on the floor with a ghost staring down at him. He woke up on a strange room. As he got up, the nearby closet was shaking. He assumed someone was trapped inside and so he explored the house with only a flashlight on his hands.   Back Story 002 Around 1950’s, the house was owned by a woman and a boy. The woman was married to a soldier who died during the second world war. When the woman heard of the sad news, she drowned herself with grief. Their 9 year old son was playing in their laboratory when an accident occurred and started a fire. The boy was trapped inside the room and the woman was in their library still crying. When she sensed that there’s fire nearby, she rushed into the laboratory but she couldn’t open the door. She hears her son cry in agony and she forced her way in. The boy was dead. She couldn’t accept the fact that she also lost their only son, and so she sat there and let herself burn as well. When the authorities found out, it was already too late. The house wasn’t entirely burned, only the laboratory, but the woman and child are both locked inside. Nobody ever tried to open it ever since. Years later, people who passes by the house for temporary shelter found themselves trapped inside and was never heard of again. The ghost of the mother was often spotted by passing travelers and residents from neighboring towns. They say that the mother still grieves for the loss of her husband and son and continues to cry everyday.   Game event sequence / Walk-through

  • Player wakes up in a strange bedroom. Follow the guide arrows to recover his flashlight
  • Follow another arrow leading to the outer corridor. Enter the next room
  • There’s a note: note1 on the table to the right. Read it
  • Go down the stairs
  • Take the closet key from Living Room bathroom
  • Go back up the second floor and enter the room with the shaking closet
  • Open the closet using the closet key
  • The ghost suddenly appears from the closet and a short blackout takes place
  • There’s another note: “note2” stating the instruction on the painting puzzle
  • Go down the first floor into the display room
  • Lit the torches of the paintings in proper order (young to old)

(From Left to Right) (2)fetus, (4)child, (5) teen, (3) adult, (1) old woman The 4th painting opens up revealing a safe

  • Go to it and get the storage room key and another note:note3 .
  • Enter the storage room and find a dead end with a wall
  • Kick down the wall to break it
  • A path to the basement is revealed
  • Go to the animal cage room (first room to the right) and take the Key to Tom’s Room
  • Go back up to the 2nd floor and opens Tom’s Room
  • A note is found  note4
  • Take the crank from the end of the outer corridor. Another note is found:  note5
  • Enter the other room and out of the other side of the main corridor
  • Enter Grandmother’s Room and takes the Library Key
  • Go down the basement and enter the library
  • Go inside the library and find a dead end with a different shelf
  • Touch the shelf and the shelf rotates revealing an inner room
  • Take the Music room key and a note: note6 from the table
  • Go back up to the 1st floor and enter the music room
  • Use the crank to play the music from the music box
  • After the song take the laboratory key and read the note: note7
  • Go down the basement and enter the laboratory
  • You’ll see the remains of a human in the room. Go to the end and take the Main Hall Key and a note: note8
  • The Ghost suddenly appears and starts chasing you
  • The fire engulfs the entire house except for a few paths leading back to the exit
  • Upon reaching the main hall again, the Ghost may appear again and chases the player
  • Approach the main hall door and use the key to exit
  • End of story

Methodology ART & SOUNDS

Asset Tool Procedure
All 3D Models (house, furniture, props, ghost, etc.) 3D Studio Max 2010 Basic polygonmodelingUse of Unwrap UV modifier for UVmappingUse of Bones for therigUse of Skin modifier for rigging of ghostsUse of other modifiers for further improvements of the modelsAnimated characters using FK (forward kinematics) and IK (inverse kinematics)Exported all to .FBX
All 3D Textures Adobe Photoshop CS4Wacom Bamboo Pen Tablet Brush painting &Photo Manipulation for texturing
VFX / Visual Effects Unity 3D 4.2 trial version Use of basic particle emission and tweaking of its parameters to achieve certain effects
SFX / Sound Effects Windows Media EncoderAudacity Converted sound effects taken from various sourcesEdited sounds through audacity, added effects, tweaked its settings, and exported to .wav and mp3 formats.
UI and HUD Photoshop CS4 All user interface, buttons, HUD elements and screen layout

PROGRAMMING & INTEGRATION

Component / Feature Tool Procedure
Importing 3D Assets &Integrated into unity 3D Studio Max – Unity 3D 4.2 Imported .FBX files into unityManaged assets foldersCreated prefabs
Lighting / Flashlight Unity 3D 4.2 Used default lighting components of unity (spot light). Shadows unavailable in TrialversionAdded a script to turn it on and off and to decrease its battery and intensity over time while in use. (For PC build only) use FKinect version disables the light control. Meaning, the flashlight remains open all throughout the game and still deteriorates over timeAn indicator in the HUD is displayed to show the flashlight’s battery decreasing over time of use.
Interaction(reach, kick, open, pick, play) Unity Used a customized script to have the mouse trigger make the player interact with certain objects.The Interaction Range script is attached to a Collider which isparented to thegameobject.The gameobject has its own script attached to it together with the interaction script which sends the message to the interaction range script that the object has been triggered.Kinect gestures such as kick, reach,  open, and pick are all mapped to the interaction script
Movement Unity The basic movement and navigation components of unity such as character controller and mouse lookscrips are used.TheKinect movement is divided into different motions:Move forward – put right foot forwardMove backward – put right foot backwardTurn – turn shoulders left or right Crouch – bend upper body down (bow down while moving forward) Jump – jump in place ( 6-8 inches from the ground)
Triggered Events Unity Using the interaction script, events such as: closet, child ghost, and rocking chair events. These events use the same script in which the collider of the gameobject is triggered by the player’s collider.This is also used to bring out HUD icons, door names, texts, and item names.
Ghost Unity Using the ghost script attached to a collider which has a spherical radius, it detects whether the player is on sight (when the player collides with the ghost’s collider).Upon detection, the ghost chases the player. Chasing the player = ghost’s position += distance of the player’s current position with a certain speed value.The player can avoid the ghost by escaping its vision (collider)Ghost Spawning is set to random locations set around the house that makes the ghost appear and disappear on a given time.
HP (Sanity) / Fear Unity These are variables attached to the player in which when the ghost searcher sees the player, fear value is increased from 0 to 100. When fear is equals to 100, HP goes down.The HP value is displayed in the HUDAn indicator on when the player is getting damaged is also displayed during ghost encounter
Kinect for unity Zigfu This is a unity package used to integrate kinect motions.This is a free tool downloadable from:http://zigfu.com/en/zdk/unity3d/
Light Puzzle Unity Created an array of lights and set up a condition in which the lights are supposed to be lit in correct order to open the secret vault.The light order is as follows:(from left) 2, 4, 5, 3, 1

Screenshots 002003 005 006 007 008 009 012 013 014 015 001 004 010 016 018 017 Flashlight  This project was made for some college friends

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s