


R & D
R & D
As I have quite awhile before I go into NS, I decide to spend the time on developing, experimenting with ideas and making easy to use, modular scripts that can be easily revised and reused in the future projects if needed. This includes things from various different aspects in a game such as first person character scripts, third person character scripts, AI scripts and general UI.
I also want to focus on making the code in such a way that it is easy to use and edit for the designers when editing individual values so as to allow them to make the game how it is meant to be.
I also Focus on making the code easy to read, understand and use by commenting, keeping the code clean and making functions that can be easily called to be used.
​
I usually jump around various aspect depending on what I feel is more important and interesting to me at that moment. But rest assured, the things that I made are well commented and are easy to get back to if needed, so if there are things you find interesting but I have stop working on, there is still a good chance I will get back to it in the future.
​
While I understand coding is all about creating custom code to be better suited and more optimized for the things it needs to do for each individual project, doing this allow me to better understand, learn and improve on various coding practices such as optimization, code cleanliness and making modular codes. It'll also allow me to get back to my old code and refresh on whats the best way to do certain things so that in the future I can get my job done faster!
​
If you want to suggest something for me to try or think that there is a better way to do certain things, please feel free to contact me as I'm always eager to learn things!
​
On this page, there will be a few of the best examples from each aspects and if you want to find out more, you can click on the info icon to see more works relating to that category.
UI Effects
I believe that UI is one of the more important aspect when creating a game, it can make a good game look great and it can make a great game look fantastic (also can do the opposite!). This is because its what the player will be using to interact with the game with be it using UI to do certain actions in the game or to understand what is going on in the game better.
​
Take it as though its the middleman between the game and the player, it helps the player to better enjoy the game as he have better control of the game and have the necessary information needed to make the right decision in games.
​
There are other UI works done in my FYP called "Consternation" so feel free to check that out under my portfolio too.
​
​
"Coin Burst" effect
Having played various different phone game, I notice that they use this "Coin Burst" effect to make the player feel more satisfied on their progress as they collect different resources in the games. Hence for that reason I have tried to do it myself which you can see in the video. (Please don't mind the art asset used)
As you can see in the video, each time the treasure chest have been clicked, it burst out coins with various different amount which then fly towards the top left UI after a certain amount of time.
​
Above the chest is a number representing the amount it should give out which will then be added to the UI on the top left as it touched the UI.
​
The coin are also in different sizes representing the amount that they contain (bigger the more worth it is).
​
Most of the values can be easily changed by the designer if needed such as the coin speed, delay before flying to the UI, the acceleration, burst strength and more. This is to allow the designer have good control over the desired mood for that he want for the game.
​
Programmers also have multiple different ways to work with the code as various different ways of spawning the coins are coded in. One example would be the function for the programmer to control the amount to spawn, be it a set amount or a random amount between 2 numbers by creating different functions for different occasions.


This is also linked to the object pooling system so that it improves the game's performance
Systems
For systems, I will be attempt to make systems that are used commonly in general games (e.g weapon wheel system, inventory system, object pooling).
​
Each of the system I am making is aimed at making it be easily modified and used in future projects if necessary.
​
The systems will also be easy to work with for the programmers by allowing it to be a simple yet robust system that is easy to work with, modify and worked on.
Inventory System
Click on the icon to see how the inventory system works!

Before attempting the inventory system, I used to take inventories for granted. But after making it I now appreciate games that have a good inventory system.
​
As of now, this is one of the more complex, if not the most complex system I have ever made.
​
For this project, it involved multiple things to take note of such as working with Json and making use of event handlers.
​
While it was difficult, working on this was a really unique and interesting experience as I learn how to manage and work with data efficiently.
​
Press on the "i" icon above to find out more!
Weapon wheel system
Click on the icon to see the capabilities of the weapon wheel system and what it can do!

The weapon wheel is one of the more commonly used UI in shooter games such as the GTA series, Saints row series, unreal tournament just to give a few examples.
​
Hence in this project I have decided to make a weapon wheel that can be easily adjusted and used according to the different needs of different games with support for both controller and keyboard inputs.
​
Event systems are also used to help simplify the art side of the UI by making it easier for the future projects by allowing functions to be run when highlighted, exited, and selected.
​
Click on the "i" icon to find out more.
AI (Artificial Intelligence)
Click on the icon to see more AI related works!
While I was schooling, I did not have much opportunity to work with AI because I am usually tasked with programming the UI and gameplay mechanics. Hence this is a great chance for me to experiment and learn about UI coding.
Creating a smart AI can help greatly improve the gaming experience as it can help create a more immersive world by creating a more intelligent/realistic enemies to fight against and also have better companions/NPCs that you can interact with like with another human being.
One of the things that I have always wanted to do was to make a AI that is stealth orientated. Meaning its sight and vision based instead of being distance based like some games do.
Vision based AI
So one of the things I decided to start working on is to make a vision based AI that can be easily adjusted by the designer but at the same time easy and reliable for the programmer to work on.

Here, you can see the vision range and angle of the AI through the use of editor scripting. The line updates and adjust automatically as the designer changes the values to give accurate representation on how far and how wide the AI can see. They can also change the colour of the line through the colour picker so as to make it more visible on the background or colour code different enemies with different mechanics.
​
While the view angle is calculated off the direction of the gameobject itself, it can also be easily set to be dependent on which angle the head of the AI is facing. This is useful in situations where the vision is based off the head of the animation rather than the direction of the body, hence if the model was to have a "Look around" animation, instead of rotating the gameobject itself, it can see according to the direction of the head.
First person Controller
Click on the icon to see more works related to this project!
To make a first person controller I wanted to try something different. While I was in school we usually used Rigidbodies. But for this project I wanted to try experimenting with character controller instead so that I can have a better control of the physics and fix that irritating issue where the player would fly off a slope when running up it when using a rigidbody. With that in mind I have decided too make an "overwatch clone" starting with the character called 'Tracer'. All sounds in the video (except for that kazoo BGM) is integrated into the game itself. If you want to try the build. feel free to message me for one.
​
Note: Done in 2 days!
I will be going into the details of the process and mechanics in this project in the near future (hopefully) when I have the time to do so.
Third person Controller
The purpose of making this third person controller is so that I can find a system which allows the animation of the character to match with the speed of the object, allowing it to look more realistic and immersive as it eliminates the 'slidy' feeling that some third person controller has. At the same time I wanted it to not only take in keyboard inputs but at the same time, controller inputs, which allows this controller to be use in future projects that aims to use keyboard inputs, controller inputs or both.
Before we get into details, here is a short overview of what have been accomplished. (approx 2 days of work)
In this video, multiple things are at play here. Those things are:
​
- Third person Controller
- Animation tree
- Third person camera
​
​
These will be covered in their respective sections below
Third person Controller
When coding the third person controller, I wanted to make it in such as way that it is easy to edit and adjust (for future project use) and have movements similar to some AAA titles such as Assassin Creed and Just Cause 3 (in terms of how the character moves according to where the camera is facing and the rotating of the characters). On top of that I also wanted to try making an idle breaker system that can be easily scaled and adjusted depending on how many idle breakers is to be used for the project.
Idle Breaker
The idle breaker basically uses a timer that counts up whenever the character is in 'Idle' state. Once it passes that initial idle timer threshold, the subsequent idle animations will have a shorter delay. The code also makes it easy for the designer to adjust values such has the initial idle delay, the delay for the subsequent idle animations and the number of idle breakers that are to be used.

Movement force calculation
There are multiple calculations for the movements.
​
Firstly, the script takes into account the direction of where the camera is facing
Secondly, it rotates the character model towards the direction of the camera if an input is applied
Thirdly, the script calculates the direction of force that is to be applied relative to the direction if where the character is facing and based off the inputs of the player.
​
Why did I choose to apply the force based off the character direction and not the camera direction?
​
For games that wants to have a sense of weight to the player I have made it so that the player will rotate slowly towards the direction of the camera (when going forward) instead of instantly being able to change directions. Hence when you view at the video at the top of this page. You can see when I face in another direction the player does not instantly turn towards that direction but instead slowly turned towards it. If the force was to be calculated and added onto the controller the animation would not have matched up and would cause the player to slide towards the camera while the model was slowly rotating towards the direction of the camera.
​
​
In the event if a game requires the player to have a better control of the character and allows them to change direction quickly, it can be easily adjusted by increasing the rotation speed of the model in the inspector.
​
Hence by coding it this way, it allows the script to be flexible in terms of usage, allowing it to be used in multiple different situations.
​
Animation Tree


Blend trees were used extensively to allow the animations to flow fluidly between one another which allows for a better gameplay experience.
​
The picture on the left shows that the movement is a blend tree that controls both the walking and sprinting animations (as they have to have a very good flow between those animation states) and also how the idle breakers are implemented.
​
On the right, you have a visual representation of how the movement blend tree works.
​
For the animation, 3 values are at play. Input X, Input Y and Magnitude. Input X and Y are basically your 'WASD' or controller inputs while magnitude is used to switch between idle, walking and running smoothly by allowing them to blend into one another easily.
​
This allows very smooth transitions between the states on keyboard and allow finer controls of the animation when using the controller.
​
For example. When a player uses a controller but does not push the joy stick all the way forward and instead pushes it just slightly, it'll play the walking animation but at a very slow pace. The third person controller (Mentioned above) also calculates the force that is to be applied onto the character model based of the value of the magnitude which allows the force to be lower to match the slower walking speed. (which prevents the player animation from slipping everywhere!)
The purpose of making this third person controller is so that I can find a system which allows the animation of the character to match with the speed of the object, allowing it to look more realistic and immersive as it eliminates the 'slidy' feeling that some third person controller has. At the same time I wanted it to not only take in keyboard inputs but at the same time, controller inputs, which allows this controller to be use in future projects that aims to use keyboard inputs, controller inputs or both.