My Second Game Design Blog Post – Simple damage feedback and a bit about my damage system.

Hello, today I will be writing about my simple damage feedback that I did. The point of a damage feedback is to visualize that an object that can take damage, took it. You can do that in plenty of ways for example you can create a knockback effect that pushes away the Player from the source of damage after touching it, you can create a text above the Player that the damage was dealt or as I did here, colour the Player into a different  for few or less seconds.

I already have a damage system, I can explain how it works. Basically, whenever an object in the engine with the tag “Enemy” touches Player’s collider then the Player takes damage. When he takes damage, he becomes invincible for 1.5 seconds. The amount of time on invincibility can be and will be changed when we will be balancing the game. I am using Coroutine that counts the time from being hit to the end of invincibility so that when the time ends the Player is again vulnerable to the damage. When the Players health equals or goes lower than 0 then the Player gets disabled in the engine and a game over scene gets loaded.

What I did was that I accessed the Player’s sprite’s renderer in the code and named it, after that I called it in the same function that takes care of invisibility. If invisibility is active, then the renderer changes the colour of our sprite. Our sprite’s renderer’s default colour is white so I made it so that whenever the Player takes damage the colour of renderer changes to red for the same amount of time as invincibility.

For now, that works, whenever the Player takes damage it becomes invincible and red for chosen time. The plan is to probably change it later so that the colour flashes instead of being static. If it flashes then it will be easier for the player to realize that they took damage. I don’t have much time with it so I will need extra time to make it flash. It is good as it is for now.

I chose this way of indicating damage because it makes it easier to spot then a text and it seemed less complicated than knockback. I also chose red colour when damaged because its one of the easiest couloirs to spot.noRed.png(Player is not red because he hasn’t touched the enemy yet.)

Red.png

(Player has been hit by the Enemy so he’s invincible and changes colour to red for a short amount of time.)

One thought on “My Second Game Design Blog Post – Simple damage feedback and a bit about my damage system.

  1. I like this post as it goes through a few idea’s on the feedback when getting hit and what you have implemented for it as of now.
    The theory how it works is well detailed and the pictures does help on that.
    The part about invincibility is the most interesting as it does detail what kind of function you use for it and how it works. I think that you need a more detailed distinction in the game between when getting hit and when you are invincible as you describe it as only being red for now, for me that only really shows that you gotten damaged.
    Your ideas about how different feedback for getting damaged is good and I think that one of them should be used like having a knockback and changing color and then show invincibility differently.
    I do like how you have done it for now especially as we are just in the early stages of the game development and having feedback at all is pretty impressive.

    Like

Leave a comment