Rogue Fantasy (C#, Unity, Python)
A first person roguelike action adventure.
Developed AI for enemies that makes use of a Behaviour Tree, animation events to cue attacks and sounds, and colliders to determine damage registration. The modularity of the tasks that can apply to any enemy allows for quick creation of different enemy behaviours.
As seen above, durability, cooldowns, and amounts for items were directly linked to the UI to give visual information to the player. The action bar was also designed to use the same script for item slots in the inventory, allowing easy access when re-ordering the inventory or placing items on the bar. The slots use the UnityEngine.EventSystems interfaces like IPointerEnterHandler to handle transitions and actions.
The game’s scripts don’t use up much CPU and even with the editor & profiler overhead, runs smoothly without lag. This was done through a lot of optimization that reduced a lot of garbage generation (though some Physics operations couldn’t be avoided, i.e. Physics.Raycast for line of sight). As well, the expensive scripts were made to run less often, and some scripts only activated and ran when within a certain distance to the player.
Editor & Environment
Created prefabs for interactive objects such as enemy spawners, hazards, and traps. These prefabs included scripts that gave options for a Level Designer to easily customize parameters, which were displayed through custom Editor scripts. All spawners make use of a Coroutine to stagger spawns, and preload during the loading screen into an object pool to reduce lag.
Designed and programmed a gameplay system that allows different playstyles to exist. For example, by taking the talents related to magic, staffs and scrolls could have more uses, cast twice, or increase the potency of their effects. In contrast, someone else might take the talents to specialize in using environmental objects such as pots to deal damage by increasing the throwing strength and distance. Combined with the random generation of the dungeon, this creates unique experiences for every player.
Role : Unity Developer
Used C# & Unity for programming the game, and Python to handle importing and sorting Assets such as csv data.
Git was used for source control.
The first person controller was written to be physics driven; however, due to the various interactions (climbing a ladder, standing on a spider web, swimming), there were exclusive behaviours for each condition. I also coded all of the behaviour trees for enemies, and the boss sequences as well.
The UI element assets were used together to construct together the UI, and events were added to all the necessary UI elements.
I profiled the game on various hardware settings and researched various articles about optimization. From the information I gained, I applied that to the game to get it to run mostly without any frame drops.
To help iterate and develop content for the game, I created a couple of custom editor windows and prefabs for the level designer to use. With it, he could rapidly prototype levels and create interactions inside of rooms by adding in the appropriate prefabs.