KOBUGE-Games / project-kumquat

Repo for Kobuge's 1st hackathon game (a tower defense) - name subject to imminent change
GNU General Public License v3.0
48 stars 9 forks source link

Add a healthbar for the enemies #35

Closed jmf closed 8 years ago

jmf commented 8 years ago

With this commit, enemies now have a health bar, that shows their remaining life, floating over them when they don't have maximum HP any more. Enemy health bars in action

ObaniGemini commented 8 years ago

The idea is good but I would prefer using ProgressBar or TextureProgress Nodes. They permit to do easily what you did with sprites, and maybe even more properly.

EDIT : after a discussion on IRC, @jmf proved me by A + B that his choice was better, so this comment can now be considered as unuseful

ObaniGemini commented 8 years ago

Also could you add tween to smooth the healthbar as I did in this part of Geom ?

P.S : this system is meant to work with ascending and descending health

EDIT : after a discussion on IRC, @jmf proved me by A + B that his choice was better, so this comment can now be considered as unuseful

jmf commented 8 years ago

Tweening: The time between hits is quite short, so with tweening, the effect would either be unnoticeable or the health meter would always be lagging behind a little. ProgressBar/TextureProgress: I tested out TextureProgress but wasn't really convinced by how it looked, opposed to my approach, using scaling.

TextureProgress on the right, scaling on the left Here you can see the difference, TextureProgress on the left, my scaling approach on the right.

ObaniGemini commented 8 years ago

I understand the problem...

Then it's a :+1: