Dungeons and Flatmates
Time Frame: 10.2018 - 02.2019
Roles: Programming, Lighting, VFX, Localization
Team Size: 5
A humorous Role Playing Game taking place in a very filthy shared flat, full of weird people, peculiar objects and dangerous quests.
Responsibilities
Designing and implementing a quest system that sits at the heart of the entire game logic and allowed our game designer to easily implement the game flow from a visual scripting like node editor
Creating a linear dialog system where the player or quest system can choose a dialog topic, but within a topic the players choices do not matter
UX design and implementation of all UI
Implementing object logic such as inventories and destructible objects
Providing custom content creation tools to teammembers
Implementing a savestate system based on a custom C# JSON object
Creating input handling supporting Keyboard and Mouse or Controller
Designing and setting up lighting and VFX, including custom shaders
Localization from german to english
Full Pitch
After waking up this morning, you found a mysterious note that summons you to save the kingdom of filthiness. Be the hero your kingdom needs and find the magical potion of vigilance in this first person RPG game taking place in your chaotic shared flat!
What this game has to offer:
About 2 hours of playtime
A humorous story with hilarious, voiced dialogs
Two languages: German and English
The possibility to save and return to it at any point
An extensive UI just like you are used to from other RPGs
Playable with controller or mouse and keyboard
A ton of peculiar objects, funny texts and descriptions and references to famous pieces of pop culture
A magical kingdom, beautifully rendered but in need of your help
Summary of my Work
My main responsibility in this project was to program all the logic we needed, as I was the only programmer in the team. At the core of the logic of this game sits a quest system with a node editor, which I designed to give our game designer full control over the flow of the game and allow her to script quests with minimal code support. This system, along with other custom tools and databases I created, is what allowed us to implement enough content for about two hours of gameplay in only a few weeks. Once this system existed, all I had to provide for new quests were new state transitions and state actions every now and then.
As a parody of classic RPGs such as The Elder Scrolls, the game also needed extensive dialog. Due to time constraints, we decided to not have actual dialog trees. Instead I implemented a system where once in a dialog topic, the player can chose between different answers, but they have no effect on the dialog. Luckily the humorous atmosphere of the game made this work just fine. Which dialog topics are available is dependent on the state of quests. When the player initiates conversation, a topic can either be forced by the quest system, or chosen by the player.
Another aspect we wanted to parodize was the sometimes overwhelming UI of RPGs. For this, I had to implement a surprising amount of menus, screens and HUD functionality, something I did not have a lot of experience with. The most notable of these are the inventory with a paperdoll for player equipment and state, a filtered item list and item detail display, a questlog and a HUD with a variety of dynamic objects such as questmarkers, a dynamic crosshair, a growing XP bar and more.
Next, we needed objects the player could interact with in the environment. There were relatively few types of interactive objects. We only had inventories that could be open or unlocked by quests and items, destructible objects that could optionally only be destroyed by certain weapons, doors that could be locked and unlocked just like the inventories and static NPCs. Since we did not have an animator or character artist in the team, our NPCs are all “hidden” behind objects; the player simply interacts with the object to initiate conversation.
Another feature that I implemented in part for the parody and in part because I had never done it before was a savestate system. With it, we could save the state of quests, dialogs, inventories and objects and reload them asynchronously. To make this work, I created a C# object that could load a JSON file and let me interact with it like one would in javascript to add and edit fields and values.
Two other features I added purely because I wanted to learn something new were support for keyboard and mouse input or controller input, with the UI tooltips reacting to changes in the active input device, as well as support for multiple languages. For this, I used my JLOC language manager, which I had created a few months before and continued to improve during this project. Since the game was designed in german, I translated all the strings on the side. Unfortunately, we did not have the chance to also record the voice over in two languages, but it would have been rather easy to implement support for multiple languages here as well.
Finally, to balance out all the technical work, I also set up the lighting and VFX in the game. For the lighting, we wanted the game to appear warm and beautiful, as a contrast to the filthy environment, so a large amount of light comes from sunlight falling through windows, as well as candles. In addition to the static light baked in Unity, we also wanted to have pronunced light shafts coming in through the windows. Originally we used an asset from the Unity Asset Store for this, however it did not work correctly and I ended up using a raymarched volumentric fog shader I created in the previous months to fake the light shafts.
To breathe some life in the otherwise very static environment, I created particle effects like dust dancing in the light, smoke curling up from incense sticks, candle flames, steam coming out of the shower, water splattering out of a broken toiled and flies buzzing around trash bags.
Quest System
The quest system was crucial for the amount of content we were able to pack into this game. Additionally, because it controls almost everything in the game and is event based, there is almost no game logic running in most frames, leaving the majority of the frame for graphics work. With the node editor I created for it, it is essentially a visual scripting system. All quests have a pre-start and a finished state, between which can be any number of branching intermediate states. Transitions from one state to another are triggered by code defined, data driven conditions, which were mostly relatively simple event listeners.
The entire flow of the quests in Dungeons and Flatmates was based on the following few simple transitions:
Accessed a specified inventory
Aquired a specified item
Used a specified item
Finished a specified dialog
Entered a specified area
Opened or tried to open a specified (locked) door
Destroyed an object
Each state (except the pre-start state) can execute code defined, data driven actions when entered. These are what enabled us to reward the player with items, xp or achievements. For this game, we only needed four actions:
Add or remove an item from a specified inventory
Change player stats (such as XP or health)
Activate an achievement
Play a sound at a specified position
Finally, each state has a long and short description that are displayed in various places throughout the UI, as well as a note field for annotations during development.
To support this quest system, I also created various databases with custom editors to allow creation of items, achievements and more from data.
UI
After the quest system, the UI was one of the most complex things I worked on in this project, and took a lot more time than I initially expected. There are five major parts to the UI: The main menu and loading screen, the in game menu and its submenus, the dialog screen, the HUD and modal popups. One of the big challenges throughout all of these was to make controller navigation intuitive and satisfying, utilizing a selection indicator and bold text to highlight the current selection.
The main menu is relatively simple, with only simple buttons to start a new game (with a prompt to enter a player name) or load an existing save file, change the game language, show the credits and quit the game. The loading screen is less straight forward than it seems, as it has some special, humorus effects. As expected from an RPG, it shows sometimes more, sometimes less useful hints and images pulled from a database. It also artificially increases the loading time massively, with the loadingbar jumping back and forth randomly. However, “loading” can be accelerated by mashing buttons just enough to make one wonder whether it actually has an effect or not.
The in game menu is multiple levels deep. At its root is a radial menu inspired by The Elder Scrolls V: Skyrim. From there one can access the inventory, questlog, saving and loading or quit to menu or desktop.
The inventory was the most complex part of the UI to implement. It consists of three areas. The first is a paperdoll that displays equipped items, the player level, player stats and unlocked achievements. Next is an item list that can be filtered by item type. Items can be inspected, equipped and used from here, and at the top the player name is displayed with the title of the latest unlocked achievement. Finally, next to the inventory, item details are displayed, such as an image, name, description, weight and value.
The questlog is relatively simpler and shows a list of active quests, a list of finished quests and a dynamic quest description that grows as the quest progresses, with the latest addition being highlighted. The player can also select wich quest should be active here, which can show questmarkers and details on the HUD. Saving and loading is similarly straight forward, with the twist that for every actual existing save file, more list entries with random names for a database are created, as a parody of the constant saving before every small event many players do in RPGs that allow it. Quitting, finally, simply opens a second radial menu with the options to quit to the menu or the desktop.
The HUD was something I had quite some fun with, as it was full of parodic elements. Multiple bars display player stats such as health, mana, XP and the mysterious cleanlieness. Health and mana work as one would expect, however the XP bar grows with every level the player gains, until it goes of screen. Many HUD elements become progressively more dirty and disgusting as the cleanlieness bar goes down.
Quest markers for the active quest are displayed over their world locations on the HUD, and relative to the player position in a top down view on a compass, which also displays the name of the area the player is currently in. The name and current objective of the active quest are also displayed, and when a quest updates or the player collects items or unlocks an achievement, popup messages fill the screen with fireworks particles. I also implemented a dynamic crosshair that expands to indicate a possible interaction. Next to it, an interaction promt with the mapped input or a hint why an interaction might not be possible right now is displayed.
The dialog screen was somewhat challenging, as it had to deal with potentially very long texts and a great number of dialog options. In the end I let the list of options just go off screen and have the selected option always scroll to a pointer on the dialog box.
The final part of the UI are simple modal boxes. These can pop up when trying to access a locked inventory or door, and similarly to the dialogs offer the illusion of choice by displaying two buttons that both simply close the popup. These were mostly used as a way to give the player a hint how to progress.