Don't Lose Your Head

Experimental Games - CT5051
Team - Don't Lose your Head - Bartosz Ankiel, Joel Carver, Jack Finch, Jacob Thompson, Saffron Paterson

Don't Lose your Head
A VR 3rd/1st person Percpective swapping game
Jack Finch - Designer
Flame Colour Swapping Concept:
To visualise the concept of the player being able to swap between flame heads with different abilities I created a short animation in 3DS demonstrating how this may look in game.
Keyboard Prototype:​​​​​​​
Camera Placement/Swapping:

Once the initial concept of the game was mostly completed and we knew what the plan for the game as a team, the programmer realised upon looking into VR that the process to get the core mechanics of the game may take longer than first assumed. So the designers realised in order to design and test levels that make use of the unique mechanic of swapping between moving 1st person and static 3rd person we would need a working prototype than could be played/tested without the requirement for a VR headset.

I created a new Unity project and made use of the First person controller unity package to start creating a keyboard prototype of Don't lost your head.
Above can be seen the working mechanic of being able to swap your POV to the interactable object (Lamp) by looking at the lamp and then pressing the "E" button. The player can then return their POV to their body by pressing the "Q" key. However, the player was at this point able to swap their POV back to the body from anywhere in the scene. The remedy to this was to write a script that checks that the player is within range of the lamp before allowing the swap to happen, but this also needed further refinement by having the script applied to each lamp within the scene and then only be enabled when the player is on that specific lamp otherwise the player would be able to swap their POV back by simply being within range of any lamp within the scene.

Water Puzzle Mechanic:

The next core mechanic needed for testing the desired puzzles for the game was the water doors/barriers planned during the conceptualisation stage and then a switch or button then can open/close said doors. 

Within the prototype this effect was done by having the doors box collider disabled when ever the player enters Collison while "HeadOn" is set to false. But is enabled when ever the player swaps their head from any lamp back to their body.
The video above shows the water mechanic blocking the player from going through while their POV is on the body but allows the player to go through while their POV/Head is placed on a Lamp. The player can also be seen using a switch (represented by a large cylinder in the wall) to disable to door by again pressing "E". After which the player swaps their head back to their body and then demonstrates being able to pass through the area the water particles once were.

During this stage Post Processing was added to the Unity build in order to be able to add a vignette effect to the camera of the player, that could be enabled when looking at a lamp. The purpose of this is to give the player a visual queue that they are able to press "E" to swap their camera also allowing for visual feedback to the player that an object is  interactable.
Initial White Box:
Layout:

At this stage of development, the VR build was still at a point where we unable to test/properly control a player through a scene to test level layout or puzzles so the Keyboard build was used in order to create the initial layout of the starting area of the game.
By making use of the online tool Dungeon Scrawl, the starting/spawn room was designed that would act as a small tutorial area for the player. The design above shows how the player will start within the back of a van, implying the story of the player being delivered somewhere before awaking (there will be other objects in the van with them to solidify this further). Upon leaving the van the player will enter an open space in which they can get use to their control system stress free. After exploring the room at the far end the player will see a door way to pass through that will have a sprinkler system turn on, blocking the player from going through said door way. The player will clearly be able to see a switch/lever through the door way have only be able to use the tools around them to get to the lever which will be the lamp.

The design of the level should hopefully allow for a player to learn the mechanics of the game without being directly told how to do something.
At this point a mock up of a VR style Menu scene was created, there is currently so funtionality.
Visual Development:
At this point in development the design and art teams started to create 3D and 2D assets for the project but the VR build was still at a stage where most testing and visualisation was better off done in the keyboard build. So some of the more important functional models started to be implemented into this build for testing and the keep the development pipe line moving.
The Lamp model created by Jacob was imported into Substance to give it a metallic brass texture and the Candle inside was given a red waxy material. This was then all pulled into Unity where this model was swapped out with the capsule that was being used to represent the lamp up until now. The lamp prefab was then also given a point light then had an obvious orange glow to make the lamps stand out and draw the player attention.
The Switch was now given a model, that I created in 3DS max, basing it off an old industrial factory power switch with exposed copper terminals and fuses. This switch was then given an animator to show it moving to the down/off position when interacted with as well as turning off the door associated with it. By making use of emissive textures the main body of the switch was given a yellow/orange glow to make it stand out as an interactable and draw attention in the same way as the yellow glow coming from the Lamps. As part of the feed back for these switches it was recommended to have the player be able to interact with one of these switches before the first puzzle to that they know they re able to interact with them, this will be added later in development.
Because Don't Lose your Head is designed to be a VR game I started to test some of the Visual design aspects of the Characters hands by stylising them with flames coming out of the disembodied hands that you have in most VR games but this allows these hands to makes thematic sense within the world of this game. This effect was created using unities particle system in which low poly geospheres with an emissive texture that makes them appear to glow orange are emitted in a pattern and at a rate to imitate flames. To further this effect and other emissive objects within the scene i made use of the post processing package's Bloom effect.
See through wall shader:

One of the issues discovered while testing the levels designed by Jacob was the ability to locate the character when they go behind an object. This was also a point made early on in one of the progress presentations that it may be possible to lose track of the player if they are is an object between their head and their body. To fix this I created a unity shader that would always render in top priority but show the player as a white silhouette through walls and other objects.

above  can be seen how the shader appears in game.
Modular Design:
Walls and Doors:

The next stage of development was to build the Warehouse itself to be able to build the tested puzzles/levels using the art assets created. I created modular Wall, floor and door models in 3DS max that can be snapped together to build a level quickly and efficiently with each part being a uniform size that makes making further modular pieces easier to design, create and implement into the unity build.

The 2D tile-able assets created by Saffron were used to for the brick texture of the walls and doors as well as to bring a stylised look to the floor and metal sections of the walls.
This stage of development was where the VR player controller was at a point where it could be developed in visually with the use of a VR headset for testing things such as the hand flames and the modular walls, but there was as of this point still no water mechanics or switches.
Above is a short clip showing how the flames on the hands appear in VR with full hand tracking, as well as the first stages of putting together the modular assets in the level.
We realised at this stage we that neither build was as far along as we would want at this stage as the keyboard build which was originally only created for testing had lacked the experimental feature of VR but also any core scene art assets, and the VR build still lacked the core mechanics required for the basic levels/puzzles. So with the dead line getting closer the keyboard build started to be developed further so that it could be used to demonstrate the full design and art aspects of the game while some what simulating VR. 
Continuing with the modular design to make the walls feel less sparse modular pipe models were created that could be snapped together in unity to create snaking pipe work that wraps around the walls of the level.

it was also at this stage we reflected on the feed back of giving the player the opportunity to use a switch before the first puzzle and by making use of the Van rear models created by Jacob, that I added an animation to the rear door of the van allowing for it to be opened and closed. Using this the player starts the game trapped in the back of the van with the only thing around them being a couple of crates and a glowing switch next to the door. The design of this is to give the player little option but to simply try interact with the few objects at around them until they realise interacting with the switch opens the door and frees them... 
Building The Game:
The switch inside the van used the same model and animation as all other switches in the game so that the next time a player sees one of them in the level they will immediately recognise it and should be able to quickly figure out that interacting with these switches allows them to progress. 
This is the point of development where the actual main part of the warehouse and therefore the Puzzles started to be built/rebuilt using the modular prefabs. To keep with the warehouse theme the walls used to break up and pace the map are made to look like warehouse shelving in which different boxes can be added or removed if sight lines are ever needed throughout the level.

Puzzle 1:
The first true puzzle teaches the player about sight lines. When the player first approaches it they will see it from a similar angle to the one shown above. However unlike the tutorial water door there is no switch immediately visible to the player. The player must interact with the lamp in order to swap POV's... 
...by doing so the player is then able to see under the stack of crates and gain a direct sight line of the switch required to shut off the water door and progress further. The player also has to make use of the shader over the character which allows them to keep track of the players position through the crates.
Puzzle 2:

The Next Puzzle combines what's been learned from the last puzzle in terms of sight lines along with showing the importance of perspective.
The player has to look around to find this lamp as it it placed up high so may not be immediately obvious, but by getting a better angle to look through the water door and locating the switch first the player can locate where a clear line of sight would be from, which in this case is up high. Upon finding the switch and swapping perspective the player can use the perspective lines of the shelving racks to line up the character with the switch through the crates. The player can also make use the of jumping mechanic to make both swapping with the lamp and flicking the switch easier.
Puzzle 3:
Puzzle 3 is the first puzzle to introduce the moving forklifts the model was creating in 3DS max as separate parts so that things like the "claws" can be lifted (animated) separately. the level is designed so that as people approach they instinctively swap with the lamp on the forklift pallet...
...upon doing so the player is met with the above view which gives little to no information for the player on how to tackle the puzzle. At this point the player should collect their head off the lamp and have a look around the area, if they jump they will be able to see where the switch is on the other side of the crates. if the player then makes their way around the forklift they will find a switch on the rear of the forklift that what flipped will raise to forklift up allowing for the player to be able to see the switch over the crates and then complete the puzzle.
It is possible that the player may decide to brute force this puzzle and simply try to blindly find the switch on the other side without flipping the forklift switch. There is no problem in doing this as the next puzzle makes the switch on the forklift very visible to make the player aware of these switches if they weren't already by the end of this puzzle. 

The image above also shows how this level was designed so that the end of the level can be seen glowing through the stacks to give the player a better sense of where they are aiming to get to.
Puzzle 4:
Puzzle 4 has the player complete a jump puzzle in order to reach the switch, this is also combined with the forklift mechanic, this is done by having the forklift raise a crate into the correct position so that it can be used as a step in order to jump up to said switch. 
The image above shows the puzzle from the reversed angle so the door from the previous puzzle can be seen behind. In game the player would approach from the door way seen in the background up to the "light Camera" seen in the left side which to the player would be in the right .

The boxes of this jumping puzzle are angled to the door way which makes jumping up a challenge in terms of perspective, this would be easier to see the perspective in VR however, on Keyboard and mouse the player can position their camera to that the crates are perpendicular to their POV meaning the puzzle only requires moving left and jumping to complete.
The image above shows the addition of the Puzzles Designed by Jacob rebuilt using the modular components with the addition of moving forklifts.
Menu Scene:
The menu scene for the game is designed in a way that better suits a VR game. The way this has been done has been to make the menu exist within a 3D space where the player physically interacts with the menu buttons. The main game Title and image is projected onto a cube map sky box that means that it always remains the same size in the players view. The menu button "interactables" are the lamp model used throughout the game, this is to make the player aware of the fact that these lamps are interactable as a small tutorial as such.

The player controls was also added to the scene so that the player knows how to control the character within this scene once they realise they can move around in this physical state.
Pause Manu:
A pause menu was added to the game as well. This menu could be accessed by pressing the Escape key, pressing it again closes the menu or pressing the play button also closed the menu. Delta time is set to 0f making sure everything in game freezes while paused. 

The player controller being used as park of the keyboard build was causing issue in the way it locked the position of the mouse to the centre of the screen. To fix this the player controller script was edited to make disable the mouse locking while isPaused = true, at the same time while isPaused = true the player camera would no longer take input from the mouse movement by putting the camera controls in a simple if statement.
Pressing the Controls button in the pause menu opens up this second window that shows the basic control layout of the keyboard version of the game.
Sounds:
All sound effects were sourced from Zapsplat.com
All music was sourced from PlayOnLoop.com
The music played throughout the menu and level itself was picked for a few reasons. The sound of the music is relaxed as to not make the game feel stressful and a rush to complete levels. The music also has a mysterious tone which adds to the fantasy aspect of the game and makes the warehouse feel more mystical. The final reason that drew us to this song was the name of Water Drops, this name has a strong connection to the game play what with the sprinkler systems breaking up each puzzle through out the level.
Model update:
We decided to swap out the original model from one with legs to a new one that has more of a flame like genie tail, Joel also made animations for the character which were implemented at the same time as updating the model. 

The genie tail design was originally decided on to make the model more compatible with VR as generally speaking in VR game the player doesn't have legs and their body tends to hover as just a torso. This also has the added effect of giving the character a more mystical feel.

While making these changes I also made it so that the mesh of the player body would rotate its forward direction to match the direction of the velocity of the player characters rigid body, this makes the movement while in 3rd person feel a lot more natural and intuitive.
Jacob Thompson - Designer​​​​​​​
Following the brief idea of the game, myself and Jack were tasked with creating puzzles with the concept based on the head switching mechanic in which the player can place the head down and switch camera to the head as the camera has been switches, in which the player has to pass through water walls when their head is off.

After explaining the logical side of the game for our solo programmer he realised the original concept of the VR was going to take much more time to create at which the other designer decided to create his own scene in which we would experiment with level design to visualise the feel of the game and ensure the level design would be satisfactory for the player.
During the time in which we didn't have a scene setup for VR testing I decided to begin level design in which I created a brief level design for a 3 part puzzle in which there is 3 head positions and 3 water door the player will have to pass through, 
Following the implementation of the level into unity prefabs were used to demonstrate the play test the levels and experiment with playing the levels, through testing of the levels we realised that when the character model would go out of view of the player they would struggle to carry out the puzzle.

During feedback it was suggested we find a way the player can see the player model through walls as they believed it would become an issue in further development, following this feedback Jack (Designer) he found a way to apply a shader so the player can see a silhouette through the wall.
As seen below my level was made in the scene in which the use of forklifts to create different angles in the level to add further depth to the level in which there was 4 different water doors with the use of forklifts in each different section.
During the development of the game we realised we decided that most of the bulk assets would work well enough using the PBR rendering within 3ds max as seen below with the workbench in which they were multi-materials were used to apply one material to the full object then apply specific parts of the texture to specific sections of the model.
I worked on asset creation alongside with Jack and Joel, being a designer and artist respectfully, in which we made the main required assets for the game to work then began working on "bulking" assets to flesh out the levels to make them feel lived in and make the rooms feel more like the respected theme being a warehouse. 
This is the model in game in which the base of the workbench's model was changed to work in scene as the blue made it standout too much.
During this assignment I was assigned to assist with the creation of assets which would be used within the scene to increase the realism of the scene and bulk out the scene, here is a image showing the use of assets in game ranging from the decorative lamp which ended up being used as the camera change location, the main mechanic of the game, to the sprinkler head which was used for our water door as a main mechanic
Saffron Paterson - Artist
Character concept art

This is some of the original drawings of the character concept art. Inspiration was mainly drawn by mythical creature known as a Dullahan who is depicted as a headless rider person that carries his own head in their hand or under his arm. in the collage of images we wanted the character to be wearing a cape and have their head be a ball of fire that could be interchanged with different colours.
Main menu art

For the main menu I wanted to have to flame on the characters head be the main focused like it is glowing in the darkness to emphasise the dark fantasy theme. During development I had to change the background to fade into black so in the VR the environment blends in. I also had to change the word "head" from being inside the fire illustration to being part of the fire illustration so the word "head" would be the head of the character.

Environment textures

For the textures I had to make a seamless illustration of the wall and ground. I decided to make the style a painter like texture so it has more depth and detail. I made the art more desaturated as well so it would fit the dark fantasy style.
Caution signs

During the assessment I was asked to design caution posters to be scattered around the environment. Due to the medieval fantasy style of the caution posters also had to be designed them the same way so I had to make up quotes based on the theme. the quotes consisted of "Caution of hazardous magic items" and "This is a Great helm area".

Buttons

When designing the buttons I had to keep in mind that menu is very dark so to contrast that I made the buttons a lighter colour so it is easier for the player to see when playing.
Joel Carver - Artist
Original Concept

I came up with the concept for the game we would be making, I wanted to make something challenging from the perspectives of everyone involved (programmers, designers and artists). knowing I had to make the concept for VR I decided to go for a game in which you are a dullahan and your head (detached from your body) was the camera and you controlled the body of the character. I pitched the idea and formed a team of people excited to mess around with it.   
Original Model

I made the original model based on the original concept I made for the character. I made the model on Zbrush so I had the high poly and I would then export that into 3ds max and use the poly draw tools to make the low poly over the top of it. I would then plan to make simple walking running and jumping animations for the character along with help out with a bit of the modelling of assets in the scene.
scene assets

I made some assets that were on our asset list to flesh out the level a bit more and make it feel a bit more real. I tried to make them as low poly as I could so that if we needed to use a larger amount of them for any reason it wouldn't have much of an effect on the on the performance in engine.
The Original Model Textures

I wanted to make the textures for the model as close to the concept are as I could I game the body a cloth texture and then manually went in and coloured the buttons in with a gold texture. the rest of the character we decided on being shadow like so I made them black and then gave the textures and the high to low baked model to the designers.
Changes to the model

We had a team meeting and decided that it would be a good idea to change the model of the character, this change was to make the legs into more of a wisp that would move with the character. I made the change in 3ds max on the low poly model and then when I had finished doing it there I took it into Zbrush and made the high poly version of it to bake onto the low poly to put in engine.
Rigging and Animating 

I made a simple spine for the character using the bone system, this allowed me to bend the character and through leaning them forward and curing the wisp back mixed with a little bit of up and down movement I made a relatively convincing walk and run cycle. For the jump I just has to compress the character slightly more and then un-compress them giving them a bit of height. These were relatively simple animations but they fit the theme of our game well and don't feel out of place in the slightest. I added areas in the low poly mesh to make it so the mesh could bend more without the polys overlapping each other.
Retexturing

the last thing I did was retexture the model after I changed it, making it the same as the previous model. After I had finished doing this I exported the newly baked model and the textures and sent those along with the animations over to Jack who then implemented them into the level.
Bartosz Ankiel - Programmer
Initial attempt at making a camera switching system
The first thing I worked on on this project was engineering a camera placing/swapping system and the functionality for a VR character controller. I have decided for using the XR Development Toolkit provided by Unity to be able to grab the player's head, however at the beginning I wanted to focus on making my own scripts to implement the aforementioned mechanics. I worked on this for the first 2-3 months of the project, having also made a PC version of the game for the rest of the team to be able to test the game themselves. At the end, the camera swapping system was fully implemented, however it was filled with bugs (player's hand would not be able to move after the head is back on the player character and the cameras would not turn off properly). I also made VR player and Head Place Area prefabs, that are the ones currently used in the final build of the game, as well as a PC player prefab for testing the game on PC.
Overhauling the system
After weeks worth of messing with my code and consulting other people that offered help, I decided to overhaul the system from scratch, this time using the XR Development Toolkit when I could. As a result, I managed to remake this mechanic, adding a socket interactor to the Head Place Area prefab instead of using my own HeadCameraSwapping script. I have also implemented a keybind for the A button on the VR controller to return the camera to the player's head. Both of these mechanics worked, and I moved onto implementing this mechanic in the level made by the team's designers, which introduced a bug that is currently still in the game, that being that the head doesn't consistently trigger the camera swap. While attempting to fix this issue, I helped Jack in making the functionality for the switch prefab, making a it a grab interactable and using a hinge joint in conjunction with a script I made to check if the switch is in a up or down position. Depsite many attempts, I was not able to get rid of this bug, and it is still there in the VR build of the game at this point in time.
Walkthrough of the mechanics
Don't Lose Your Head
Published: