Edited by warnexus, 10 February 2013 - 09:49 PM.
Calculating damage calculation in game loop
#1 Members - Reputation: 448
Posted 10 February 2013 - 08:44 PM
#2 Members - Reputation: 117
Posted 10 February 2013 - 10:19 PM
Your problem isn't you calculating damage on the collision method (though i think it's wrong); I think you problem is that the OneEyeSkillSlash collides with your ship through various frames, making your ship life decrease rapidly.
So you have some options.
- Destroy the OneEyeSkillSlash after a hit.
- Make your OneEyeSkillSlash not be able to damage again the ship.
- Make your ship invincible for a short time after being hit.
- Implement some other mechanic.
#3 Members - Reputation: 448
Posted 10 February 2013 - 11:23 PM
Your problem isn't you calculating damage on the collision method (though i think it's wrong); I think you problem is that the OneEyeSkillSlash collides with your ship through various frames, making your ship life decrease rapidly.
So you have some options.
- Destroy the OneEyeSkillSlash after a hit.
- Make your OneEyeSkillSlash not be able to damage again the ship.
- Make your ship invincible for a short time after being hit.
- Implement some other mechanic.
Ah yes, that is correct. It is checking every frame!
Thank you. I know what to do now.






