Implementation
In terms of the actual gameplay mechanics, I am reasonably happy with the way the code turned out. A few particular snippets that I am particularly proud of shall follow.
The code, as you can see, is structured in small and tight packages. I found that with a lot of previous projects, my code would tend to become quite convoluted and spaghettified - not so here. Fragment (top) deals with the game objects of the same name, and tells the HUD (above) to display a certain piece of lore depending upon which was recently collected using a list of enumerations. I found this much easier than loading every single image into the code and using arrays or if-statements all the way down in order to deal with what would appear and when. Shadow (below) deals with the enemy logic. Although relatively simple again, it works using tags to make absolutely sure that they only interact with the player. Depending on the player having T as a companion or not, it either transports itself to the edge of the map upon contact, or transports the player back to their apartment. Using the shadow as a “follower” of the player when in a certain range allows for the correct result every time, and makes sure that the player does not get mobbed unless they walk into an ambush of several shadows at once. Finally, FadeInOut (bottom) is generally robust and can fit into multiple projects, and allows for smooth fade-to-black transitions between scenes. This was one of the very few bits of “juice” that I was able to put into the game in this build before I ran out of time.











