Friday, 19 October 2018

Blood Splatter (Damage Feedback)

Call of Duty is particularly famous for using red vignettes to display damage has been inflicted. There are many games that use a similar approach to give the player feedback, especially in First Person Shooters.

For a zombie/horror-themed game, I think it is quite a key aspect that should not be too difficult to implement.

Tutorials:
https://www.youtube.com/watch?v=JmaOjS4p7o4
https://www.youtube.com/watch?v=WMA73ukITj4

By following these tutorials I was able to learn how to create a blood vignette for my game.


The vignette I will be using for my game, I found on DeviantArt uploaded by 7he1ndigo


To begin with, I used an Image and rescaled it to Unreal's default resolution 1920x1080 to fit the screen. Once I had the size correct, I added the blood vignette image under Brush.

I had to scale the "A" (alpha) under Appearance > Color and Opacity to ensure that the vignette is not visible immediately when the player starts the game. Titanic Games method seems long-winded, so I was able to learn how to use the animation feature by Virtus.

Clicking the +Animation button, I then selected that I was using it for Color and Opacity. This provides a timeline on the right-hand side, with this I selected to have the vignette 35% visible at 2 seconds, then fade out by the 3rd second.

I chose quite a low opacity in terms of percentage because the image I have chosen is extremely overpowering, which will make it difficult for the player to continue playing and escape the danger, especially as it was concealing the player's health/armour bar.



By selecting the Graph in the top right corner on BloodVignette, we can add a Player Animation node to the Event Construct in the EventGraph. This means the blood fading animation will be activated when the widget has been created. 


I created a simple damage system where I have added the blood vignette so it is triggered when the player is taking damage. By adding the extra nodes, connecting it to the viewport, it means it will be displayed in-game when the player is taking damage. If we do not add this step to the Blueprint, it would not be visible to the player.


I created a cube that does nothing other than damage the player if we walk on it, simply for testing purposes. In the image is the vignette in action, I tweaked the animation time and opacity percentage until I was happy with it.

It's an important aspect in games, especially First-Person Shooters and I was very surprised how easy it is to implement. One way I would like to take it further is by keeping the vignette visible at all times while the player's health is below 20% to stress the danger they are in, and that they need to find health. At the moment it is currently only visible whilst the player is taking damage, then it clears away regardless of the player's health.

At this stage, I do not want to spend too much time on perfecting each element. Rather, I am aiming to implement a good range of features that I am generally pleased with, which I can then go through with extra time and tweak each feature to perfection.

No comments:

Post a Comment

Unreal: Project Evaluation

Unreal is visually enticing and appears to be extremely user-friendly. In the beginning stages, I found it really nice to use and I was exc...