Top Top
Jarory de Jesus
code.PNG

Code Snippets by Jarory

*The site has been experiencing some issues with the embedded Gists. Please refresh the page if they do not show. 


Concrete Rose Callback System

For Concrete Rose, we needed a flexible system that can support multiple types of actions on a single button press, depending on JSON data feed into the combat scene. This set up allows us to populate card data from JSON (Not shown) and then use that data in a series of callbacks attached to singleton managers. Classes can subscribe to the managers’ functions without having to get an instance of them stored in memory. In this example, the TurnTableActionManager stores a reference to a reflector. When either turn table action wants to activate that reflector, they ask the manager to do so by providing their own data from their card. This in turn allows the reflector to know what properties, such as elements and strength, it needs to activate with.


Fenced AI State Example

I needed a dynamic AI system that could detect the player and make important decisions. Using a state machine, Unity's event system, and some basic pathfinding, I was able to create a set of scripts that allows the AI state manager to call a During() function that varies by state. Each state also has a TransitionTo() function which tells the state manager to enter this new state, dropping the other one. 


MasterHero Power Up Interface

This code was used in the game MasterHero to create a dynamic power up system. Since players could drag and drop their powers around in various slots mapped to different number keys, I had to have each number key use powers on key down agnostic of the power in the slot. I used an interface to accomplish this. 


Power-Up Interface in C++

I wanted to draw off my interface experience with power ups before. C++ does not have support for interfaces, but Unreal does have a solution for that. Here is my implementation of that. I did not write any of the power ups themselves, just the architecture for using them. I may write a power up in the future as this project is on going. 


Beat Detection

For this assignment I had to create a rhythm game. Using a BPM analyzer and some help from Gamasutra I was able to create an algorithm that could allow the player to fire but only on the down beat.


Swap Function

For Project Imp our core mechanic revolves around swapping positions with clones of yourself that you can spawn around the world. Swapping positions with an enemy in the middle allows you to steal some of their power. This is the base of that system that I designed.