Learn You a Game Jam - Day 2


Bit of a rough day two, not going to lie.  Got the Slime added in, and started building a hit/damage system when things got trickier.  Same with the Guildie management, I ran into a frustrating problem where I couldn't get an @export variable to show up in their Inspector and since these were thrown together tests anyways,  I decided to deleted them to start over. 

Short Term Goal:
Get damage system working.

Medium Term Goal:
I need to plan out my Guildie structure (including exactly how the  1 Inv item plays into it) and implement it.

Medium Long Term Goal:
Get the combat system fully working with basic behavior.  MainTank moves and attacks on player command and Guildies and Enemies are functional with a basic action, movement, and decision making.


I'm going to have to Learn Me Some signals.

Right now the damage is working by calling a take_damage() function on the body that enters the Slime's DamageZone.  Then I had a function in the Main Tank, Archer, and Priest that ran the damage animation and printed "Hurt!".  This is how I structured the KillZone in the Brackeys Tutorial so that I could customize the death behavior for each character.

That's not going to work this way here.  For one, if the entering body DOESN'T have a  take_damage() function, it will crash the game. I did this with the Guildies before I added their take_damage().  The MT had a take_damage() and showed damage when contacting the Slime, and the Guildies crashed the game when they touched it.  As expected.

The other is that I want this damage to happen regularly, not just when the body enters the slime.  I would need to keep track of bodies that entered and are still there and periodically goose them with damage and remove them from tracking when they leave.  There is an Area2D method that will return all the overlapping bodies in an Area2D as an array. That seems like it would work but the docs say "Don't use this, use signals instead." OK.. lol.

I also need to think about how I want damage to effect the player/guildies.  I'm basically using classic WoW as my basis for how to manage these various systems, since its really my only frame of reference... and even that's pretty hazy.

A stun doesn't make sense so I don't think I will be using the damage animation in the pack.  I will likely use a shader or something to color the character to show damage, but otherwise leave them uninterrupted while taking normal damage.   I also want multiple damage sources to affect a character at once, so I don't think that I-Frames are going to be used much if at all.

Ideally when a body contacted the slime it would take damage and start a  looping timer for the next time this body will take damage, and then delete it when it leaves the body.  That is not a lot to track, and it might be necessary at some point, but I think I can make things simpler for now.

I want the slime damage to act in pulses.  I could just just animate the DamageZone collider to periodically expand outside its Body Collider and then back in again at the rate I want it to deal damage.  I can then just use the on_body_entered signal because it will turn on an off with each pulse.  You don't get damage on contact, and everyone would take damage at the same time regardless of when they made contact.

Also seems cleaner than disabling the collider or monitoring/monitorable since those get fussy on when you can modify them.

Its a simple solution - no keeping track of anything outside of contact and the downsides seem minimal, so I will go with it for now.

I'll see how day 3 goes!

Get Guildies

Comments

Log in with itch.io to leave a comment.

I love how signals are set up in Godot! Looking forward to hearing about your experience with them. Great work so far! :D