GRAIN
Development Time: Seven weeks.
Team Size: 9.
My Role: Lead Programmer, GamePlay-Scripter.
Engine & Language: Unity / C#
This game was made as a school assignment during the Spring of 2018, and marks the first time I got to take on the role of Lead Programmer (albeit of a programming team consisting of only two people, myself included). As Lead Programmer, my responsibilities included not only making sure all code in the project lived up to a certain standard, but also to communicate with the design- and graphics teams to ensure that all planned features were feasibly doable in a certain time. I learned a lot from this project, both in terms of programming and Lead-Role responsibilities, and I had a lot of fun developing Grain.
Grain makes widespread use of reusable code in the form of class-inheritance, interfaces and delegate methods to keep the code clear and concise, as well as to allow for easy implementation of new items, abilities and interactable objects in the game, without having to write more new code than absolutely necessary. Any programmer's dream!
MagicDash
PickUpable & IInteractable
BaseEnemyScript
Just as with all abilities, items and interactable objects in the game, the enemies in Grain are constructed using class-inheritance and interfaces in order to easily create new enemies with unique behaviors. A basic example of this is how Hound-enemies aggro; while enemies by default pursue and attack the player as soon as the player is close enough, the Hound-enemies first stand still, turn to the player and howl before resuming their normal aggro-behavior.
HoundAI
SEVERAL SCRIPTS WORKING TOGETHER FOR BETTER STRUCTURE
The Player Character in Grain is built using several scripts, each with specific tasks in mind. For example, the PlayerCombat-script handles everything related to attacking enemies and taking damage, while the PlayerMovement-script handles all different movements of the character and the PlayerInteractions-script allows it to interact with objects in the world, such as pulling levers and picking up weapons. No messy code in sight!
PlayerCombat
PlayerMovement
PlayerInteractions
The InventoryManager-script utilizes delegate methods to allow the player to intuitively navigate their inventory and select, equip, use or upgrade items easily.
Inventory Delegates
While we didn't actually program any actual cheats, we did program a console where these could be entered and interpreted by the game as well as a couple of codes that did fun stuff. For example, if the player types "DEJAVU" in the console's input field, whenever the player then sprints, speed lines are shown across the screen and the song "Deja Vu" is played.
ConsoleScript