top of page

Jump Scare

Whenever player enters the trigger area, a ghost will popup and a scary audio will be played. I have created 4 jump scare locations to scare the player. The ghost is actually a 2D png image which I turn the shader into Sprites/Diffuse, and the trigger is a cube wall with a removed mesh renderer. The position of the ghost and trigger is really important because if the trees block the line of sight of the players, they might not be able to see the ghost when it pops out. I have to test a lot of time to find the best position to place the ghost image.

 

 

 

3D model

Most of the 3D model are downloaded from the unity assets store and material in class. However, model of upside-down temple and rock lion at the beginning of the game are built by myself by using Autodesk Memento in another course. They are both real building located at Wong Tai Sin Sik Sik Yuen. However I turned the temple upside-down because I think that a hanged model will looks creepier.

 

Gate / Cemetery model download:

https://www.assetstore.unity3d.com/en/#!/content/56402

 

Key model download:

http://archive3d.net/?a=download&id=ff0be17f#

 

Doll model download:

http://www.123dapp.com/creature/Rabbit/2303854

 

Game Map and Terrain

The game map is designed as a circle, wherever player enter the forest they can return back to the metal gate. By raising and lowering the terrain, players can see which way they have to go and not get lost. The trees are used as a natural collider to control the direction where player can go. And there is only one way to walk through the forest. Keys, dolls and batteries are evenly distributed on the map, each game component should not get too close to each other so player will not find it easily.

 

 

Code and Script

Most of the script are referenced from Ryandome, a youtuber who teaches people how to create a game by using unity 3d. I edited his script and change some function and apply to my game. All of them are Javascript and the form below has shown some of the script in my game. Bold words represent script that I add in or created by my own. 

 

 

 

Ryandome Youtube Channel: https://www.youtube.com/channel/UCPKTGyjQa-YOumypxsBKvRw

 

Ryandome Script download: http://ryandome.com/index.html

 

var doorClip : AnimationClip;
var Key : GameObject;
var DoorSound : AudioClip;
private var Door = false;
private var playerNextToDoor = false;


function Start ()
{

}

function Update ()
{
if (Input.GetKeyDown ("e") && Door == true && Key.active == false && playerNextToDoor == true)
{
AudioSource.PlayClipAtPoint(DoorSound, transform.position);
GameObject.Find("Door").GetComponent.<Animation>().Play("DoorOpen");
}
}

function OnTriggerEnter (theCollider : Collider)
{
if (theCollider.tag == "Player")
{
Door = true;
playerNextToDoor = true;
}
}

function OnTriggerExit (theCollider : Collider)
{
if (theCollider.tag == "Player")
{
Door = false;
playerNextToDoor = false;
}

}

function OnGUI ()
{
if(playerNextToDoor == true && Key.active == true)
{
GUI.Label (Rect (Screen.width/2-50, Screen.height/2-55, 120, 50), "It is locked");

}

if(playerNextToDoor == true && Key.active == false)
{
GUI.Label (Rect (Screen.width/2-50, Screen.height/2-55, 120, 50), "Unlock the gate");

}

}

 

Open gate with key & play door open animation 

    var Doll : int = 0;
    var dollToCollect : int = 3;  //number to win!
    var dollSound : AudioClip;


     function OnTriggerEnter( other : Collider )
      {

if (other.gameObject.tag == "Doll")
        {
          AudioSource.PlayClipAtPoint(dollSound,transform.position);
            Doll += 1;
            Debug.Log("A doll was picked up. Total dolls = " + Doll);
            Destroy(other.gameObject);
         }

      }

     function OnGUI()
     {
         if (Doll < dollToCollect)
         {
             GUI.Label(Rect(20, 10, 200, 35), "" + Doll + " Creepy Dolls");
         }
         else
         {
             GUI.Label(Rect(20, 10, 200, 35), "All Creepy Dolls Collected!");
         }
     }

 

Pick up dolls & count collected dolls

var TheKey : GameObject;
var KeySound : AudioClip;
private var playerNextToKey = false;


function Update ()
{
  if (Input.GetKeyDown ("e") && playerNextToKey == true)
{
AudioSource.PlayClipAtPoint(KeySound, transform.position);
TheKey.active = false;
}
}

function OnTriggerEnter (theCollider : Collider)
{
if (theCollider.tag == "Player")
{
playerNextToKey = true;
}
}

function OnTriggerExit (theCollider : Collider)
{
if (theCollider.tag == "Player")
{
playerNextToKey = false;
}
}

function OnGUI ()
{
if(playerNextToKey == true)
{
GUI.Label (Rect (Screen.width/2-50, Screen.height/2-55, 120, 50), "Pick up Key");

}


}

 

Pick up Key & active the key
(player will be allow to unlock the gate when they get the key)

Light

Since my setting is in midnight the game environment will be dark, therefore the directional light of my forest should be quite gloomy, that is why I change the light colour into dark grey. 

 

And for the player’s flashlight I am using the spotlight. I move the spotlight a bit right to the FPS controller so it feels like the player are using their right hand to hold the flashlight.

 

The flicker green light in the temple and lion are made using point light, the flicker light function are based on Ryandome script as well. I feel that green light makes the whole ambience scarier and creepier.

 

Also, I have added a low intensity red point light under the dolls and battery. It is because the environment of the game is very dark, adding point light will be easier for player to recognise there is an object to interact with.

 

Lastly for the candle of the rock stair with the key, I added a brighter green point light. As the key is the requirement to win the game, I do not want the players to miss it. Therefore I make it more obvious for players to find.

 

 

Sound Effect and Music 

I downloaded most of the sound effects at freeSFX.com and Sound Effects HD Indie Studios youtube channel. However, some of them are silenced at the beginning for too long, it causes a delay between the player’s action and the sound effect. Therefore I have to edit the sound effect at Adobe After Effect and cut out the silence part. Also, the background music used are from another game called Minecraft, produced by C418. It can create a sense of creepiness which fits the game.

 

Free SFX download:

http://www.freesfx.co.uk/

 

Youtube SFX source:

https://www.youtube.com/channel/UCh8eCmLaWenUYBEszs7E1sg

 

Music Album source:

https://www.youtube.com/watch?v=obgSqOyM8Q0

 

@ 2016 by Jessie Huen. Proudly created with Wix.com

bottom of page