Hi there, and welcome to this very special weekly update!
Yes indeed, this one can be special. Everything about this update is related in one form or another to death.
As you may or may not know death (or the capacity for a player to lose) can be an important part of any game. It can take many forms but in our case, it's a typical death.
So without any further ados, let's dive right into it!
Weapons and View models
One of the most striking updates I've made was to weapons, or more precisely how the player uses weapons.
Previously attacks, in general, were mainly governed by actual skeletal animations (i.e. the actual world model of the player)
This meant that when a player swings a weapon the attack would be oriented not to the head of the player but to its body. One adverse effect of this is that the player couldn't aim up or down.
Now, I've introduced view models to the game.
For those who didn't know, view models are 3D models that only appear on the player view. (Think of it like gun models in Frist Person Shooters)
These make it really easy to align attack not to the actual world model but to the view. This is especially useful to fix our up/down aiming problems.
Of course, this meant that a big refactor was in order but I think it makes the game much more enjoyable.
Another effect of this change is that guns and other aiming weapons now have their own animations, meaning that they are now actually aiming at the crosshair in the middle of the screen.
There's also a unique melee attack animation for these too.
Previously, changing weapons such as the Bow didn't have any visual indicator of how much tense the bow was.
Although this could have been fixed with animations, I didn't rig any weapons as of now. Paired this with the view models refactor and it wasn't really wise to immediately embark on such adventure.
To fix this I've decided to add a nice charging bar that shows how much power a charged attack will have.
There's even a nice gradient and everything.
Projectiles and compound colliders
Previously there was no actual difference between melee and ranged attacks. Both used the same colliders and did the same damage.
However, now this has changed. Projectiles are now testing their hits based on a completely different set of hitboxes that are spread all over the model, one for each body part. This makes hit detection react realistically. It also means that, in case of arrows, we can stick the arrow to a particular body part and make the former follow the latter in a realistic manner.
There could be a damage bonus in the future but at the moment it's not a priority.
Aside from that, there's another benefit of using compound colliders: rigid bodies. When the player attacks using a projectile and make a lethal strike, the game can then apply a given force to the rigid body that was hit, making ragdolls behave more realistically than ever before.
And finally, here's the best part: our own mortality.
Yes, now players can experience the full thing.
When their health drops down to zero, players simply die in a flamboyant way by using ragdolls.
When they die, the camera is transferred to a ragdoll and a sad jingle is played.
After the jingle ends a nice death popup shows up and the player has three different options.
This options simply reuses the same run configs (aside from the seed which is regenerated) and start a new one.
This options boots back the player to the main menu. From there the player can load a new save file and start a new run with a different character and seed.
This is quite simple: it ends the game and closes the app.
The popup itself has dynamic texts that changes based on how powerful the last blow was.
In the future, there might be different types of damages leading to different types of texts. We might even change the text based on what killed the player, to begin with.
That's about it for death.
- Fixed many bugs related to enemies.
Refactored almost everything.
Every C# events were replaced by UnityEvents. Although their implementation isn't actually any better than the native one this gives us the ability to edit events directly in the Unity Editor. It can also give us the ability to change which type of collections are used to store every observer.
- More optimization opportunities, yay!
- Added a bunch of extension methods (That thing is OP, to be honest)
- Removed a bunch of unused codes and whatnot.
- Every C# events were replaced by UnityEvents. Although their implementation isn't actually any better than the native one this gives us the ability to edit events directly in the Unity Editor. It can also give us the ability to change which type of collections are used to store every observer.
Reduced muzzle flashes.
- This could have been hazardous for epileptic people.
Added a nice keyboard (?) model.
- Fixed bugs whit the analog blur effect dishing out unclamped colour values, resulting in strange dark lines artifacts.
Added a death plane at the bottom of levels.
- This means that pesky player that found their way out will suffer the consequences. 😈
- Fixed bugs with the character selector highlighting the wrong character when switching screens.
- Changed some sounds and added a bunch of new ones.
Next week will probably a continuation of the cleaning process. Afterwards, it's boss time!
I've also started to read this book on game design, so there might be some unplanned edits here and there, too.