Semester 2 – Week 12

I was given the task of graphics programming and write a shader program to render the screen black and white only highlighting the red color . This was one of my first shader programs and I had to do quite some research on it since it is going to be taught to us in the next semester. So I made a post processing shader for the camera.
The difference can be seen in the Original and After Shader picture as follows :
After Shader


After completion of the detection and direction of sound mechanic, I was assigned to add NPC’s in one of the iterations which make random noises. Out of the random noises the NPC’s there is a person calling out to you and you need to find and follow that person.

The basic mechanic was already done but I had to polish it by adding real people and controlling their animations through the code and Unity 5 animator. I was also supposed to make a realistic level looking level for it. So after finishing the black and white graphics of my earlier scene I began my next iteration.

Semester 2 – Week 11

So based on the task assigned to me I created this scene in Unity which shows the mechanic of depth and direction of sound and it mimics binaural audio using Logarithmic Rolloff.hm1The scene presents three balls in front of you which are the only pickable objects in the room.

hm2As you point the cursor on the ball the GUI highlight pick up and you can pick the ball up.

hm3When you pick the ball it looks like the above picture . The ball has a bounce custom material which allows it to mimic a real life ball.
hm4You can then throw the ball and the place where it bounces it produces a 3d sound which is quite accurate in terms of depth and direction.

The following is the javascript code that uses the GUI element and allows certain objects to be pickable and others to not be pickable and throwable.

#pragma strict

var refusethrow = false;

function Start(){
function Update(){

function OnTriggerEnter (other : Collider) {
if (other.gameObject.tag != “player” && other.gameObject.tag != “pickto”){

refusethrow = true;


function OnTriggerExit (other : Collider) {

if (other.gameObject.tag != “player” && other.gameObject.tag != “pickto”){

refusethrow = false;


This other part of the code which is picktoscript basically does the interaction between the mouse to throw the object and uses the OnGui() function using javascript.



#pragma strict
var objectPos : Vector3;

var objectRot : Quaternion;

var pickObj : GameObject;

var canpick = true;

var picking = false;

var guipick = false;

var pickref : GameObject;

function Start () {

pickref = GameObject.FindWithTag (“pickup”);

pickObj = pickref;


function Update () {

var raycheck: Ray = Camera.main.ScreenPointToRay(Input.mousePosition);

var hitcheck: RaycastHit;

if (Physics.Raycast(raycheck, hitcheck,10) && hitcheck.collider.gameObject.tag == “pickup”){

guipick = true;


if (Physics.Raycast(raycheck, hitcheck) && hitcheck.collider.gameObject.tag != “pickup”){

guipick = false;


objectPos = transform.position;

objectRot = transform.rotation;

if(Input.GetMouseButtonDown(0) && canpick){

picking = true;

var ray: Ray =

var hit: RaycastHit;

if (Physics.Raycast(ray, hit, 10) && hit.collider.gameObject.tag == “pickup”){

pickObj = hit.collider.gameObject;

hit.rigidbody.useGravity = false;

hit.rigidbody.isKinematic = true;

hit.collider.isTrigger = true;

hit.transform.parent = gameObject.transform;

hit.transform.position = objectPos;

hit.transform.rotation = objectRot;



if(Input.GetMouseButtonUp(0) && picking){

picking = false;

canpick = false;


if(Input.GetMouseButtonDown(0) && !canpick && pickObj.GetComponent(pickedupobj).refusethrow != true){

canpick = true;

pickObj.GetComponent.<Rigidbody>().useGravity = true;

pickObj.GetComponent.<Rigidbody>().isKinematic = false;

pickObj.transform.parent = null;

pickObj.GetComponent.<Collider>().isTrigger = false;

pickObj.GetComponent.<Rigidbody>().AddForce (transform.forward * -1000);

pickObj = pickref;


if(Input.GetMouseButtonDown(1) && !canpick && pickObj.GetComponent(pickedupobj).refusethrow != true){

canpick = true;

pickObj.GetComponent.<Rigidbody>().useGravity = true;

pickObj.GetComponent.<Rigidbody>().isKinematic = false;

pickObj.transform.parent = null;

pickObj.GetComponent.<Collider>().isTrigger = false;

pickObj = pickref;


function OnGUI () {

GUI.Label (Rect (Screen.width/2,Screen.height/2.1,Screen.width/2,Screen.height/2), “X”);

if (guipick && canpick){

GUI.Label (Rect (Screen.width/2,Screen.height/2,Screen.width/2,Screen.height/2), “Pick Up”);





Semester 2 – Week 10


After role playing some of the mechanics in the last iteration we distributed the tasks and my task was to make a Unity Scene that displayed sound direction. So we went in brainstorm mode and thought about our respective tasks.

The scene I thought of designing was a house where there are pickable objects which would provide an environment interaction. You can pick three colored balls and as you throw them they will will make a 3d bouncing sound using the Unity Logarithmic Roll Off thereby producing an accurate sound with depth and accurate direction.

Semester 2 – Week 9

After GDC week it was time to work our thesis and we were back in Salt Lake City. We resumed the development on the Binaural Sound thesis game. So the game idea revolved around a protagonist girl who is sort of imprisoned and like every other person in the world is going to get changed into something that is evil . Hence the goal of this game is to induce a feeling of liberation by escaping such a hell house and freeing herself from the evils that she might commit in the future. This was the basic narrative. We yet had to think of evil corporation that is turning innocent children into something evil.

The next important component was the mechanic. We decided to role some of the mechanics which were sound based. We basically tied cloth on one of the persons eyes and tried to make noise from different parts of the room and checked whether the blindfolded person could identify where the sound is coming from the depth. Hence Depth and Direction were the first mechanics we were going to build upon.

The following picture shows some of the mechanics we were going to experiment with.


Semester 2 – Week 8

This week we got a chance to go to San Francisco for the Game Developer Conference 15 ! Everyone was really excited for the conference. I attended several GDC lectures and got a chance to speak with industry people and make connections. I got to hang out with the game developers at the microsoft xbox, intel, unreal engine and Unity booth. I also got to try new games and technologies all all these booths which was awesome.10887247_10152824044358655_4870440770154060173_o







I sat for a couple of AI and graphics lectures. They were lectures on new physically based rendering systems and shaders which were quite interesting. The AI and Physics lectures were also quite good. Through GDC I realized that my specific area of interest in terms of game programming is in graphics which was something I did not realize before and hence it was quite a memorable trip.