Friday, January 4, 2019

Damage System and Enemy Interaction


"Buffered" damage system

In the video you can see the new basic attack animations (3 combo standing, 1 jumping, 1 crouching), some damage counters, health bar, enemy physics interaction (pushing the player).

As for the damage system, on the huge majority of 2D platformers the system is quite simple:

  1. The player object collides with enemy object
  2. The player receives a certain amount of damage
  3. Checks if the damage was enough to kill the player 
  4. If it was, play the death animation on the character, remove control from the player, game over
  5. If the player still has health remaining, play a short "staggered" animation on the character
  6. Make the character invincible for a couple of seconds and rapidly flash the character sprite
  7. the player continues playing the game
I wanted to try something a bit different for my game, so I'm playing around with the idea of letting the player receive damage until a certain threshold is achieved (something like 20% of max health). This allows a couple of interesting things in terms of gameplay:
  1. It gives a bigger error margin to the player when fighting on close enemies
  2. It allows the player to push, pull or stand on enemies to reach higher places
Since it's so early I don't know if I'll keep it or not, but I'm liking the potential of this approach.

No comments:

Post a Comment