Devlog #6 - Knockback,Hitstop,CameraShake


Overview

 -Added new sound effects for skeletons walking

-Organized attacks into a data asset for better organization

-Made choosing attacks into a function

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hello everybody and welcome to another devlog for Sceptre of God. Today we shall we covering :

1. Additional sound effects for enemies

2.How I better organized my attacks and made them more modular.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Additional SoundEffects

Skeleton when walking around should make some rattling noise so I added some bone rattlig to let the Player know that they are near.

Also added attenuation to enemy attacks so you wont hear them they are like an entire room away.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Better Attack value management

This change came about as I was beginning to add a knockback and hitstop mechanic to the game.

The way attacks were being stored was that I had a structure called S_damageInfo whenever damage was being applied and manually inputted the values in the blueprint. This made the attack system very rigid and made it so enemies even though they had different animations, the properties of the attack would still be the same.


So, instead I decided to adopt a new approach, I used the data assets to create data assets for my attacks that have the S_damageInfo as a variable along with hitstop duration and knockback.


In my BaseEnemy class, I created an anim_montage map with their corresponding data asset.


I created a function to randomly select a montage to play and the replaced the S_damage_info with the one found in the data asset.

The best part about this set up is that I can override the choose attack function in the child classes so I can change the behavior of how the attacks are picked if I so please.


------------------------------------------------------------------------------------------------------------------------

Knockback

Now we get to the feature I actually wanted to implement is the knockback when an enemy hits the Player or when the Player hits the enemy.

To accomplish this I utilized the launch character node to add velocity to my attacks.


As you can see in the above image, I also created another structure for knockback configuration and I added it to my attack data assets, so I can control how much knock back I want my attacks to have on a case by case basis.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hit-stop, CameraShake and more Hitflash

Another feature I wanted to implement was a small hit-stop whenever damage happens, I used ‘set time dilation’ to alter how my much hit-stop I wanted and even added a hit-stop duration float variable in my attack data assets for further customization and control.


Though as you can see it looked unpolished and lacked the impact that I wanted. So, I added a slight camera shake whenever the Player takes damage and it improved it by a bit but it still looked a little awkward.


So for good measure I created a red flash that happens whenever the Player takes damage.


---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thats all for this week, if you want to support the game please consider sownloading the game and donating or if you want to support me directly please come to my Kofi page.

https://ko-fi.com/swordsage10


Support Me at ko-fi.com

Thank you very much for reading, have a good week!!

Get Sceptre of God

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.