New machine gunner enemy


This latest update adds one of the most influential weapons of the first world war, the machine gun. This was one of the features that I really wanted to get into the game jam version but reluctantly had to descope to finish on time. I've gone for a simple tripod mounted machine gun with a German soldier operating it, you eliminate the weapon by shooting the soldier.

This feature had two key problems to solve:

  • Moving the soldier around with the weapon so that he was always behind it.
  • And making sure the soldiers hands looked like they were holding the weapon.

The first problem turned out to be pretty straight forward, have the soldier be a child of an empty game object which acted as the pivot, the soldier was offset back from the pivot and I simply needed to set the pivot's Y rotation to be the same as the weapon to ensure the soldier is always directly behind the weapon. This worked great as long as the soldier and weapon pivot were inline. Ideally the soldier's feet should have been animated to make it look like he was stepping left or right as he spins around but in reality you never really get close enough to notice the feet skimming across the ground. I also chose to cut a corner when it came to aiming up and down as in most cases it wasn't required due to the height of the mech and the flat terrain.

The second problem of having the soldiers hands hold the weapon actually ended up being very simple thanks to the Animation Rigging package. I simply added two empty game objects as IK targets shown below as the green dots, and then positioned them next to the weapon's hand grips. I then used two bone IK constraints configured against the soldiers hands to keep them attached to the weapon.

This new enemy class does a lot to shift the balance of power back to the computer, but actually the more important change was found by simply tweaking the other enemies visual and attack ranges. These minor changes result in more enemies spotting you sooner, which means you tend to be swarmed from all sides rather than simply being able to pick off enemies at range with impunity.

What's next?

I'd like to look at adding some sort of health pack to allow the player to repair their damage which would allow for longer levels. This is a really straight forward change in theory but I'm just not sure how to sell it to make it feel believable. Maybe I don't try and just add something simple like a toolbox?

The level needs more variety which isn't difficult but it does take time. I'm thinking of adding some intact and partially destroyed buildings which would become more prevalent the further behind the enemy lines you go.

The other thing that I've been thinking about is a classic Red Barron Fokker DR1 Triplane flying overhead dropping booms from time to time. It's a bit gimmicky I know but could keep the player on their toes and up the intensity.

I'd be keen to hear anyone's views on what they think it needs next so please leave a comment below if you have any suggestions.

Files

Mechs take the Somme (version 1.2) 24 MB
Oct 19, 2021

Get Mech's take the Somme

Leave a comment

Log in with itch.io to leave a comment.