Jump to content
  • Advertisement

Unity Weekly updates #22 - LETHAL

jb-dev

687 views

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.

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.

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.

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.

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 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. 😈
  • 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.




0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • What is your GameDev Story?

    In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

    (You must login to your GameDev.net account.)

  • Blog Entries

  • Similar Content

    • By Rof
      Hello guys! I am new to Unity3D and also new with C#. I am currently working on a 2D Platformer game. This would be my first game ever. I really need some help in coding and animation. I was able to create script already for my Player Movement. I already have the basics coded and working (Walking, Jumping, Attack, Dash). I also have an extra feature which allows the player to jump longer if he/she presses Space for a longer period of time.

      I just need help in fixing the Jump + Attack. Whenever the player Jumps and Attacks at the same time, the character will ignore the x velocity of the object and will only continue the x velocity after the attack animation.

      I'll really appreciate any help that you can give me 
      Have a great day!
    • By TreektusPL
      Hi everyone!
       
      I'd like to introduce you to my android game.
      Sphere Control is a simple adventure and recreation game. In the game, we move the ball. The game has currently completed 10 levels. Each level differs from the previous one and introduces new elements to the game, eg a new trap, obstacle, mechanism. Our task is to get all the crystals at a given level. We will be hindered by various traps, obstacles such as moving objects and tasks that we must solve earlier. The game is in a low-poly style.
      The game is now available on Google Play: play.google.com/Sphere-Control
      Website: worthout.com
      FB: facebook.com/Worthout
       
      Screen:





    • By snacktime
      Looking for feedback from someone who has done this, mainly just to confirm that my guestimates are not way off.  I know enough to be dangerous not my area of expertise.
      Trying to budget for a custom 3D skeletal animation system with cross fading and 2 layer blending.  Context is Unity.
      My thought is someone who has done it before could probably get the core features working in some form in a month.  But by the time you factor in everything like bugs, performance refactors, platform specific gotcha's, whatever, it's probably around a 6 month job to get something actually usable in game.
      Does that sound reasonable?
       
       
       
       
       
       
       
    • By Data7 Games
      Roles Required: Experienced Animator/Rigger
      My Role: Creative Director, Game Designer & Writer
      My Previous Projects: 2 small mobile games

      Team Size: 6 At The Moment (including me)
      Project Length: Estimated to be completed sometime in 2020/2021

      Project Description: Rift One is a half-life inspired FPS game, you play as mark maxin, a police detective who is mysteriously kidnapped by a secret organisation! They want you to enter a portal, to another world, or they will kill you if you don’t, but before you can, the lab is invaded! And you are forced to enter, in order to survive the crumbling lab.

      Responsibilities—
      - Create Animations as told by Project leads.
      - Polish Animations as told.
      - Working closely with other team members.

      Requirements—
      - At least a tiny bit of experience in game development
      - Ability to solve problems creatively and effectively
      - knowledge of Animation/Rigging, the unity engine & FPS Games such as Doom, half life etc.
      - Ability to Create Animation and rig
      - Strong communication required
      this is currently **A KICKSTARTER PROJECT** Meaning you won’t be paid until we are funded!
      we are currently planning and researching for our kickstarter.
      Email me at Data7games@gmail.com if interested
    • By Brain
      This is my level editor workflow. Levels are represented by simple integers in the right hand column under a component called LevelInfo, and meshes are placed manually on the grid. The grid is replaced at runtime with actual gridactors.
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!