Devlog 5: Final Touch ups Before Testing


This week's work consisted of completing any final touches to the project and working on finalising our weapon, to make sure our project is ready for the testing stage. After a team discussion, we decided we had a few areas the required some improvement, such as the lighting in the scenes, the project's UI, changing the camera angle and rotation, adding sound effects and making some adjustments to the player. 


Lighting:

Our idea for the in game lighting was to be quite dark. This was to add a visual challenge for the player so they have to pay close attention to the surrounding environment to see where the zombies are, instead of being able to see everything quite clearly. As a team we chose this type of lighting because it is commonly used as typically lighting that most horror games use to instil fear into the audience while they play as they cannot clearly see where the enemy is unless they are quite close. Another reason as to why we wanted to use low lighting is because our models we used to create the surrounding environment are low poly models, and with low level lighting the models still add to the environment without needing to be super detailed. 

To start off we used a sky box to act as out light for the scenes, but we found out that the skybox unfortunately still created too much light within the scene, allowing the player to see too much. As shown in the image below, that was our original lighting.


But we wanted something that caused the scene to be darker for the player, so they could still be able to see, but not easily. Through the use of Unity's lighting settings. This was achieved by going to Window > Rendering > Lighting > environment tab, the lighting was adjusted to be setup the levels for darker scenes, by lowering the ambient colour to an intensity of 0 and colour settings of 0.1509434 across each R, G, B value and setting the real time shadow colour to 6B7AA0 and the environment reflections set to intensity 0 and bounce 1. We also added a spot lights as a child object of the player, so the player can still see in front of them clearly.  By doing this we were able to achieve the perfect lighting for the game. Allowing the player to only clearly see what is Infront of them and to scarcely see the surrounding environment. The image below is our finalised lighting for the game. 

 

UI:

We added a few new additions to each level to make the gameplay smoother for the player. The new additions include a Upgraded health bar that shows as a green bar for health and will show as red when the health is decreased, there's a zombie count at the top right of the scene to show how many zombies from that wave are left to defeat, and a wave counter on the top left of the scene to show the player how many waves they need to survive before they can continue to the next level. We chose to add a zombie count into the game because the zombies are spawned randomly around the map, and can possibly spawn in a building. By adding the counter it allows the player to see how many zombies are in the map, and if they think they've killed them all but a new wave hasn't started or the level hasn't changed, this can signal to the player they need to go looking through the buildings for the zombie/s. The wave counter is of a similar idea, except it's to help motivate the player to keep surviving to make it to the next level, because without having the counter the player could think the level is endless waves and will have no motivation to continue the game. 


We made the Health bar display 2 different colours because it shows the play the total possible amount of health so they can search for a health pack to refill their health before another wave. With our original health bar it was very confusing of the player as it didn't show how low the health was from 100%, meaning that the bar could be at 100% and the player could think it was less and use up a health pack they could need later on. 

Camera:

For our camera angle we wanted a mix of 3rd person and a shoulder cam. So through the use of a Cinemachine camera and a couple of lines of code, we were able to set the camera to behind the player, but with a bit of a horizontal offset so the camera looks over the players shoulder. The camera tracks the movement of both the player and the mouse, allowing the player to look around while the character doesn't move.   


After adjusting the vertical offset of the camera, it set the camera closer to eye level allowing the player a better view of the surrounding environment. 


One thing we are still working on for the camera is it's rotation around the player, when the player turns 180 degrees after walking forward the camera should follow behind the player always showing the player's back to the screen, but instead the player is able to turn and face the camera. A variety of techniques have been used to try and fix the camera rotation, but unfortunately none of them have been successful yet.  

Weapon:

The improvements made to the weapon were making the bullet visible after the gun was fired, and the crosshair/aim or the gun. The way we achieved the ability to see the bullet after it was fired was through the use of a trail render attached to the bullet prefab. This means that the trail render will follow the bullet, allowing the player to see the direction of the bullet fired, this allows the players to make any adjustments to their aim if they can see the bullet's trajectory wasn't inline with the target.


Bullet's are designed to self destroy when they come in contact with an object, or if you are bad at shooting like me and the bullet completely misses everything, then it will self destroy after 5 seconds of travel.

To achieve the crosshair used in the game, we created the crosshair image using  GIMP and importing it into Unity. 


The bullet's trajectory is calculated through raycasting, and can be modified during testing through the inspector by using an aim offset system, allowing us to change the bullet's trajectory through adjusting both horizontal and vertical angles. A component we've used to help with aiming is through CrosshairRaycasting using raycasting that is attached as a child component of the main camera. This helps through communicating a more accurate world position of the crosshair, meaning the trajectory of the bullet is more accurate. The crosshair is shown when you press the right mouse button down, allowing the player to see where they are aiming. 
We still need to improve the accuracy of the crosshair for different ranges, at the moment the crosshair is set for a medium range. 


Sound Effects:

This week we have added in a few more sound effects to the game, including a sound effect for when the player walks you can hear footsteps. When the player is hurt a sound effect is played to let the player know they've taken damage, which is good for attacks where the player is facing away from the zombies. Both the player and zombies will have a sound effect to play when they are destroyed, this helps signify that the zombies have been defeated instead of just disappearing, and that the player has been defeated before moving to the gameover scene. Along with the player making a sound when taking damage, zombies will also make a sound when attacking the player, this is to make it know to the player that they are being attacked so they can possibly move before the attack. 
After having a team discussion we decided to change the sound effect that was used to signify that you had taken a shoot. We did this because the old sound effect was quite jarring and loud, which we found can be a bit distracting or annoying for the player. So we changed the sound effect to still sound like a realistic gun shot, but softer and more gentle on the ears of the player. 
All sounds effects and references will be given a separate devlog, as we didn't want to make this one go on for ever.

Small Touch Ups:

A couple of other adjustments the team has made to the project is changing the height of the player as he was too tall to fit through the doors for the buildings, so we had to shrink him a bit so he'd fit. And we added a Nav Mesh to the project to help fine tune the player's and zombies' movements through the map. Although after we added the Nav Mesh to the project our zombies decided they no longer wished to walk properly anymore, so they now look like they are shuffling towards the player. Eventually we will fix it, but that will probably be after the testing period.


Nightmare Fuel:

Unfortunately for the team we ended up having quite a tricky time with Unity and Unity version control this week. One poor team member tried to access the project after not accessing it for 2 days, only to have Unity crash multiple times just trying to open the project, and once the project was open Unity would either crash trying to update the local file or Unity version control would crash trying to compare conflicts, which would also cause Unity to crash. It was only after uninstalling the Unity editor, reinstalling the editor, restarting the computer, and deleting the Library folder from the project before project was able to be accessed without anything crashing. And all was good.....Until the next day, when things where no longer good. Not only did Unity not load, and if it did it would crash just trying to open one of the scenes for not only that poor team member but the whole team. So after reverting the project back to a previous version, and each team member having to delete and redownload the project from the Unity repository, everything seems to be working as normal now. But we don't actually know what happened for it to cause such chaos, but we wish for it not to happen again.    

Unity Version Control 5 : Necrobyte Studios 0

Leave a comment

Log in with itch.io to leave a comment.