top of page

Burglar

My Contributions

Lead Programmer

My main tasks as Lead Programmer was managing workload between the Programmers. 

Overlook that the distribution of work where fair. 

Meetings with other Leads, about what work should be prioritized to be implemented and if certain tasks is possible to implement with our time period in consideration.

AI Implementation

  • Greta (Grandma)

Need Calculation 

Greta patrols between diffrent rooms. The next room she chooses is depending on her needs and rooms that has something that fullfills that Need. Her Needs is as closely what Needs we human have, for example Sleepiness. The Need's value is increased at diffrent rates and amount. Greta chosses her next room to patrol to 
by a procentage calculation. This calculation calculates a procentage of every Need's value, based of all Need's values combined. 
Then the Program multiplies every procentage by 100 and puts that Need into the list that amount of times. The multiplication is made because it's more likely to take the Need with the Highest value. Then Picks a Random Index in the List. Lastly the Program finds a Room that fulfills that Need. 

After Chasing Player

After Greta has chased the player and doesn't see the player anymore and Then Greta will do one of two thing, which one Greta do is chosen randomly.

  • Invesitigation

The Program checks if there are any rooms in front of Greta and within a distance of Greta and puts all rooms whom meets the criterias into a List. Then picks one at of them at random and investigate that room to see if the Player is in it. 

Greta Chasing and After Chasing:

  • Sneak

If Greta has also heard a noice during the last 5 seconds after she has chased the player. She can instead take a unoptinal path to the location that the sound came from to surprise the player. This is made by usage of Unreal's UNavArea. Firstly the Program finds the closest room to the location where the sound came from. Every Room has figurable amount of NavAreas, then it finds the closest one to the Sound location and changes it cost to very high one. It leads to Greta when calculating her path to sound location, usually takes the shortest path, will instead this time see that taking the path through the NavArea will be very costly and then calculate a way around it.

​

This was one of hardest problems for me to figure out during the Project. Firstly I thought of manipulate the calculated path for Greta and change the location of the points for her path, but I realized it would take a lot of time and debugging to make it work. Mostly checking if the Point is inside another object and make it unaccesible for Greta, and exactly how the design for taking a unopitonal path, programming wise would take too long aswell. Then i thought of implementing my own Unoptional path algorithm but i realized it would take too much of my time aswell and wouldn't be very Designer friendly also. 

​

After some reasearch i found UNavArea, that will manipulate the path finding for Greta to believe that walking through it will take a long time and then calculate a way around it. This i found would be solution that will take the quickest time to implement, but would take much time to test and rework and move the UNavAreas. At the same time it would be designer friendly, because designer could move them and add more and configure them to get the best way of Greta taking a unoptional path. 

  • Magda(The Dog)

She will be asleep at a sleeping postion for most of the game, which is figurable points around the world. Unless she enters one of her two states:

Bark:  She will stand still while the player is in her visible range and bark. That Greta will hear and Greta will move to that location, then the Dog will patrol for a small duration around a 6m Radius and search fo the player then go back to the closest Sleep position.

Magda Calling for Greta:

Search:  While Greta is aware of the player is in the house, Greta can make a special action. Which is awake Magda and make her running and  search for the player all around the house at a rapid pace. This will happen for a small duration then Magda will go back to the closest sleeping position

Safe Implementation

The Player has to Rotate the safedoor knob to a sequence of numbers to unlock the Safe. Then the Safedoor will be unlocked, so the player can retrieve anything that is inside the Safe.

  • Safe Knob

Normally this is pretty simple to implement but because the project was made in VR and every object that supposed to be grabbed and interacted with had continuously Physics applied to them during interaction, to make them follow and rotating with the hands. Then at the same time make the Safe Knob rotate a certain amount every time it is supposed to, so it would rotate perfectly with the numbers on the Door Knob.

After a while of discussions and trying, then realized i could make the UPhysicsHandle (that we used for making objects following and rotating with the hands) release the object, so it would not be under any physics at all, apply the rotation that i wanted and then say to the UPhysicsHandle to grab it again, so it would have know that the hands are interacting with the Door Knob. Then i could just check the rotation of the hands from the last frame and this frame, to see if there has been a big diffrence in either direction and later apply the rotation that i wanted.

  • Safe Puzzle System

On berfore hand i knew how many rotation clicks it needed for the Safe door knob to rotate for a number to be exactly upwards. Then i just checked if it was right number the safe knob was on depending on the number sequence. If it was just moved on to the next number in the sequence or if it was the last number in the sequence, the door would be open.

bottom of page