🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Weekly updates #22 - LETHAL

Published November 26, 2018
Advertisement

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)

image.thumb.png.2630314e74fc70f03e55e654c4c239bf.png

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.

image.thumb.png.94e644138d1f8f96e3b24773f3e5b85d.png

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.

swings.mp4

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.

image.thumb.png.07840230c7ad4d1caa6a0e41c9a1e1fb.png

There's also a unique melee attack animation for these too.

swingAim.mp4

Charging Weapons

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.

image.thumb.png.b10cf78f04a3b00da82b1c51bffb331b.png

There's even a nice gradient and everything.

chargeBar.mp4

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.

gettingShot.mp4

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.

Death

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.

death.mp4

Death Popup

After the jingle ends a nice death popup shows up and the player has three different options.

lcky0eyi9l021.png

Retry

image.png.efc98a1f14bea89def222991bba7bd5c.png

This options simply reuses the same run configs (aside from the seed which is regenerated) and start a new one.

Main Menu

image.png.ea4b397350f4b448ea45efed5297fcc5.png 

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.

Exit 

image.png.e4cd17e0954a2e6bdac341b58d56ac7e.png

This is quite simple: it ends the game and closes the app.

Popup Text

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.

Minor Updates

  • 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.
  • Reduced muzzle flashes.
    • This could have been hazardous for epileptic people.
  • Added a nice keyboard (?) model. 
    image.png.9fbc7fb9538be2c94d87732cc559ecc6.png
  • 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. ? fallDeath.mp4
  • 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

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.

1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement