Crimson Catacombs#

Delve into the ominous depths of the Crimson Catacombs, a labyrinth shrouded in mystery and danger. As a brave adventurer, you are compelled to explore these ancient tunnels, driven by legends of the fabled Book of Death.

This was a short horror game made over the period of about a month and the game can be found here and the game’s sourcecode here here.

This project was made along with Andrew Grujic with his links here: Itch: https://1upandy.itch.io/ Github: https://github.com/AndrewGrujic

My contributions#

Visuals#

For this project, I predominantly did the art, though this wasn’t without some code work. So one of the aims of the project was to utilize quite heavy post processing to give the game a distict visual style a game that had come out more recently at the time was Lethal Company which is well know for its low resolution graphics and interesting visual style, so I attempted to do something similar in our game to give it a very murky feeling running around the catacombs.

First thing is lowering the resolution of the game, which is easy to do with a two-camera setup, with one just rendering a ui canvas with a UI image set to a render texture and the other rendering the scene and sending it to the render texture with the texture itself being set to 960x540.

Now, for the post-processing, I use edge detection (specifically Sobel) and a posterise shader. The posterise shader gives the distinct banding to the lighting and colours, and works especially well with Unity HDRP’s volumetric fog, which is heavily used in this game. This itself is very simple to add to a Unity project, as ShaderGraph has a node called ‘posterise’, so I just sample the colour buffer and output it. Most issues I had in this project were more from implementing edge detection, which I wrote a shader using HLSL as opposed to ShaderGraph (mainly as it’s harder to do in graph form due to a fair amount of calculations required). Originally, the edge detection was using an algorithm called Roberts Cross, which is faster than Sobel but has issues with noisier scenes. This worked well before the combined effects of posterise and lowering the game’s resolution, which made it very difficult to control, as well as the original implementation being done for URP.

Why URP when you mentioned using HDRP volumetric fog? In short, I simply didn’t realise URP doesn’t have any volumetric fog implementation whatsoever, unlike HDRP, when I initially set up the project. So the only way of getting volumetric fog in the game without going through the process of converting URP to HDRP (a nightmare when you have any custom shaders) is to make my own or to buy a shader off the asset store as fog is a very challenging shader to write well and there not being any good free options for volumetric fog I chose the arduous journey of converting the project to HDRP for volumetric fog which of course have little compatibility with each other and my previous shader work was broken. Fortunately, after implementing Sobel and a lot of tweaking in-game, I got the desired effect for the game.

Afterwards, I simply went through the process of adding all the required art assets, which I built up a modular kit to build the levels with, as well as making the monster that will chase the player, along with some props to make the scene more interesting.

On the materials front for the most part I just used the normal HDRP materials as with the exception of fire as this does not exist unless you do fire via a particle system which has its own pros and cons but for us it didnt feel right to do particle systems for the torches as it would inevitably require optimising later and for the most part does not look very good (Though I feel a skilled VFX artist would most likely prove me wrong). So I did a classic method of modifying the UV of a quad that I put a simple flame texture over to ‘animate’ it, and then intersected two quads together to give it a 3D feel and make it not look strange or invisible from certain angles. This was done in the shader graph with a screenshot of the node graph below.

Player Interaction and Monster AI#

After I was done doing visuals, initially, Andrew had implemented the monster AI and player movement. I got on with modifying the work he had done to add interaction into the game so the player can activate levers, pick up keys, open doors, and, of course, climb into coffins to hide. I did a very simple implementation with a raycast from the centre of the player’s view, where it would check if the object that’s being looked at is interactable and provide a small piece of UI on screen to indicate to the player what it is, which is very useful in dark, murky, and noisy corridors of the catacombs. Every interactable had a very simple interactable monobehaviour on with everything that an interactable could ever have such as name, doorcode to open the right door, whether it has a coffin camera, etc. which if this was a much larger game would be bad due to each interactable having additional data that it may not even need which wastes memory but due to this being a much smaller scale game and that only becomes a problem when you have 1000s of interactables I’m able to do this.

For the monster AI, I implemented the view range, immediate awareness range, and some helpful additions to our growing editor script for the monster. View range is fairly simple as it’s just a matter of getting the angle between the monster and the player and checking if it’s within the monster’s FOV and that the player is not outside the monster’s view range. For the editor script, I added visual gizmos, which allowed the viewing of what monsters can see or can’t, which is immensely helpful, and I would recommend this for any project if possible, as it saves me having to do a lot of testing to get FOV and view ranges right.

Conclusion#

The project itself was a success for both me and Andrew, as we felt we managed to design an enjoyable game which, for a nice change, stayed in scope, and I learnt a lot regarding shader programming.

There was more work done as can be seen in its git history as the project is publically available to be viewed but I’m writing this about 7-8 months later after the game was done so I simply cant remember everything anymore especially in regards to optimisation as HDRP I do remember causing me a lot of trouble in regards to the fps especially with the heavy post processing and volumetric fog.