Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Content

So, I am slowly starting to piece together how the voxel shooter will play out. It's important you read part 1 so you understand what this is. It should be below this devpost.

Anyways, now that I had the tech to build a destructible environment, I decided to move ahead and start the character game development.

First I hopped onto Blender and made a very basic rigged dummy:

The actual detailed design is totally up in the air but I settled on this as it is easy to modify later. Then what I did is I went to Mixamo and grabbed some animations so that I can save time without having to animate and also have a high degree of fidelity for movement:

Next I decided to have the first weapon of the game be the German Karabiner 98.

This is because while the core game direction is still being decided on, I did decide to nudge the game towards a trench style shooter.

I had to animate the animations for the bolt action. I did reference my own bolt action rifle but my friend who actually had a K98 shared some reference videos. I took them and animated:

Next I started to work on the weapon handling mechanics. I'd like to have "perks" so that you can customize your own weapon experience in a realistic way. For example, the K98 can hold 6 bullets, 5 in storage and 1 in the chamber. However the loading clip can only hold 5 bullets. Thus, the first perk that I will implement will allow one to have 6 bullets but add a tiny bit of reload time to account for reaching for that extra bullet to put in the chamber. So in short. PERK #1: +1 ammo but +15% reload time. That's realistic.

Because this will be a shooter, I wanted to add lots of detail to enemies and surfaces you shoot at. I decided to start working on character impact decals. When you shoot a character I therefore wanted a bullethole to appear. This can be a complex problem. The issue is that the mesh that the player uses is skinned and can bend and deform to simulate limbs, fingers, etc., making physics collisions with it in Unity difficult, but not impossible.

I worked out an algorithm that analyzes the player mesh and for every limb, finds all the vertices that are part of that limb and stores those vertices in a referenceable way.

The idea is that I can always test and hit and know which limbs I hit because I have colliders attached to the limbs. And if I know the limbs, I know which vertices could possibly be hit. In this example I shoot a red line and hit the torso. Therefore I should subsequently test all torso vertices and find which one is closest to the point of contact.

Then if I pair every saved vertex with a UV position, I can find out which part of the UV I should paint. Voila:

The downside of this method is that there is a limited number of positions that you can hit per limb. I can work on refining this but for now it's good enough. With this UV information I made it so whenever you shoot, you draw a bullehole texture on the location you shoot.

Very cool. I visually improved the bullethole decals by removing the smoothness if it's black, so it looks like an actual bullethole:

Then I made it so if you shoot the head, it explodes. This was achieved by scaling the had to zero so it becomes invisible, and enabling a painted headshot head prop:

HEADSHOT

This is the point where the game is currently at. I have a solid K98 rifle shooting gameplay with some ragdoll physics and basic shooting effects. I am in the process of porting my previous networking work of Liminal into this new game, to make it multiplayer.

Stay tuned!

Files

Previews only

Comments

No comments found for this post.