Hello! In this blog, I will talk about all the updates that have been made to new and existing systems in the project. It's going to be a long one. To get started, let's talk about bullet holes.
Bullet Holes
This addition is something so simple yet adds so much to the game. It is simply the appearance of bullet holes on whatever a bullet hits. They appear once a bullet hits something and dissapear after a short duration to ensure they don't stockpile and use up too much memory even though they are small decals. There's not much else to say about them but, they look great.
Bullet Holes and Fully Automatic Weapons
The GIF above also showcases that I have added fully automatic weapons into the game. Every weapon in the game can be shot by holding down the left mouse button and now it will continue to shoot if you keep the button held down. Each weapon has a unique rate of fire which can be seen in the GIF. The ASVAL shoots considerably slower than the Mac10. This took some time to get working how I wanted it to. In the end, I used a sequence and a gate which incorporated a delay as a fire rate, spawning the projectile, and checking bools to ensure the weapon isn't firing when it isn't supposed to. E.g., if the player starts reloading but doesn't let go of LMB, it'll stop shooting.
Automatic Weapons Code Snippet
Rocks
Now onto another core gameplay element in the form of a distraction - rocks! The player can now run over to a rock that will be scattered around the map and pick them up to use as a distraction or lure against a guard. Simply pick one up, press the middle mouse button, press and hold the right mouse button for a directional curve to appear, use the scroll wheel to adjust the distance at which it'll be thrown, then let go of right mouse button and it'll be thrown. The radius at which it attracts a guard is quite high at the moment of writing this blog but it is noted to reduce the range of it in the future.
Rock Being Thrown
The curve at which the rock will be thrown is clamped to a certain distance to prevent the player from being able to throw it across the map and easily pass by every guard and/or prevent the player from throwing a rock behind them or inside them which wouldn't be great. There currently isn't a prompt which tells the player that they are full on rocks but this will be added. The rocks are also not included in the main inventory but rather in their own variable as it wasn't necessary to be in the inventory and this made it easier and quicker to implement.
Clamped Camera
While on the topic of clamping, the player camera has now also been clamped to prevent the player from looking straight up and straight down as this felt off with the placement of the camera and looked better when clamped. This also helps with the camera clipping through walls problem.
Clamped Camera GIF
Saving - Persistent Game Instance
I carried out research about a way in which I could keep some sort of blueprint that would allow me to transfer variables between levels so that I could customise options in the settings menu and have those options transfer over to the first level. I came across persistent game instances which are blueprint instances that do not get destroyed when switching levels unless they are told to be destroyed or the game is exited. This meant that I was able to keep variables in here for sensitivity, inverted mouse, and master audio which were all configured on the main menu, stored in the instance, and then set again when the main level had been loaded. This is great as it means that I will be able to transfer things such as total collectibles, unlocked weapons and more between levels even if the player character is destroyed. This can be seen in the video below as the game is changing levels and being quit multiple times and everything is still saved.
Sensitivity and Audio
I felt that it would be better to showcase the audio and mouse sensitvity saving in a video rather than a GIF so I have uploaded a video that can be viewed below. To start with, I set the volume quite low, mouse sensitivity to max and invert mouse to on and resumed play by pressing the play button. I have implemented that when the player presses the back button from the options menu, it automatically saves the game to prevent the player having to change their settings again. Now the game is saved manually for the video, the game is quit and then started again and all the settings are seen to have remained the same. Now the settings are set to other values and shown again that they can be saved and loaded.
Video Uploaded on YouTube
Although I believe these to have previously mentioned, there are many other things that are currently being saved and loaded such as the player's location, health, ammo, level, timer and collectible count. However, the collectibles still need to be adjusted to ensure that duplicate collectibles don't spawn in which will be changed at a later date. I will also add the weapons to be saved to the player.
UI
The UI has also been updated to now showcase the features that are currently in the game. For example, all the weapons now have weapon icons ot help the player distinguish between the weapons they are carrying. A rock counter has also been added as well as a cloaking counter which isn't finished yet but works as intended without any animations like the buff/debuff effects which can all be seen at the bottom right. Each icon has a blur behind it to ensure that it is visible in any lighting conditons. The weapon UI is also disabled if the player is not carrying a weapon which can be seen in the first image below.
No Weapon UI
Mac10 Icon
ASVAL Icon
M4 Icon
AK74u Icon
AK47 Icon
Suppressors
A new attachment has been added which can be put on all weapons after reaching level 2. It can easily be locked on certain weapons and the level it unlocks can also easily be increased by changing one variable. The suppressor is currently activated by pressing the B key and if it is unlocked, it'll attach to that weapon as seen in the GIF below. If the suppressor is attached to the weapon currently stowed, it'll remove the suppressor from that weapon and then pressing B once more will attach it to the currently equipped weapon preventing the suppressor from being attached to multiple weapons at once. It is also a limited item in the sense that it breaks after 15 shots have been fired. A new suppressor must then be found (not currently added) to be able to use it again. The UI can also be seen updating in the GIF where it says 'Suppressed' above the weapon icon when the suppressor has been put onto the weapon. I would like to add an animation if a suitable one can be found.
Suppressor Equip GIF
Here is a final video showcasing suppressors being used with audio. While the suppressor is being used, the enemy cannot hear the weapon being fired and so are not alerted. As soon as the suppressor is removed, the enemies are alerted to the player's position. Enjoy the video!
Suppressors Video Uploaded to YouTube
This concludes the blog on everything that has been achieved since the last and many more have been started which will be shown off when ready. The next blog should entail an entire AI System revamp as long as it is ready.
Thanks for reading and I hope to see you in the next blog which will release soon!
Comentarios