top of page

Code Samples

Code Sample - Robot Survival

Robot Survival

As this game allows the player to constantly shoot, I found there were memory issues occurring which impacted performance. This was due to many bullets being instantiated and stored in the hierarchy after their use.

​

To improve performance, object pooling was implemented, reusing the bullets after they collide with any GameObject in the world. When the player fires, GetBullet() is invoked.

Gun script pooling logic:

Robot_Survival_Bullet_Pooling.png

Bullet script collision and pooling logic:

Robot_Survival_Bullet_Pooling_2.png
Code Sample - CyberFocus

CyberFocus

As this game focused a lot on physics based movement and control of the speed of the surrounding game world for the player, there were many challenges to overcome.

​

The wall running mechanic was one of the biggest challenges, managing various components of the player as well as the physics when the wall run logic applied. Once the player touched a runnable wall, it required working with angles of the camera and player speed to give the illusion of leaning on the wall.

Below is the logic for wall running:

CyberFocus_WallRun_1.png
CyberFocus_WallRun_2.png
CyberFocus_WallRun_3.png
CyberFocus_WallRun_4.png
Code Sample - Knights Quest

Knights Quest

As an roleplaying game, this project focused heavily on NPC interaction to assign quests to the player and reward them upon completion.

​

The quest system was handled by specific NPC's holding their own quest type (kill or collect) and unique dialog. They kept track of the player's progress and handles whether the player has completed the quest or not to earn the quest reward.

When the player interacts with a quest NPC:

Knights_Quest_AssignedQuest_1.png
Knights_Quest_AssignedQuest_2.png
Knights_Quest_AssignedQuest_3.png
bottom of page