Learn You a Game Jam - End of Day 1


I made a lot of progress day 1!  I got the Main Tank, Archers, and Priests up and walking around.  The MT is controlled by the player, using either WASD, Arrows, D-Pad, or Left Stick.  The guildies are smaller and follow a point behind the MT, one for the Archers, one for the Priests.  

I'm using https://zerie.itch.io/tiny-rpg-character-asset-pack for this project, and I LOVE this pack.  I've hooked up the Idle, Walking, Attack, Heal, Damage, and Death animations in a player.  Then I hooked up all the characters to inputs, so they all walked around and used their attack/heal (animations only) together on A Button/Space press. 

Then I braved making them follow the MT. I took a  bit from Kron -  "How To Make Enemy Move Towards Player in Godot 3" YouTube video and updated it for my needs and Godot 4.  I got them to follow the MT directly just fine, but I ran into issues when I tried to get them to follow a Marker that was a child of the MT.  The idea was to have a rally point for the Priests and one for the Archers for them to try to crowd around.  It just kept staying in the same place near the origins.

I needed the global_position of the Marker for the Guildies to follow, a common mistake according to Reddit.   Global Position, I have a feeling this will not be out last encounter friend!  Then I added a flip to the LOCAL...  position of the two markers along with the sprite  Main Tank Sprite h-flip when facing left so they always line up behind the MT.


So, I have the basics down for Guildies to follow a point, I need an array of offset vectors for a proper formation and a system for assigning spots  to each character.  They are currently crowding each other  to get to the one spot, but a formation will help prevent that.  I might even turn of their colliders with each other - at least when they are heading for a spot.

Moment of pride:

I like how I normalized my player input so you go slow with the analog stick:

# Normalize to keep speed consistent on diagonal movement.  Allows slow analog movement.
var direction_norm = direction.normalized()
direction.x = min(abs(direction.x), abs(direction_norm.x)) * sign(direction_norm.x)
direction.y = min(abs(direction.y), abs(direction_norm.y)) * sign(direction_norm.y)

I don't know if min/max is better than using a if/conditional, but it feels slicker!  There has got to be a way to make it even more compact, but my attempts only broke it.


Next up, SLIME TIME BABY.  I have the slime animations ready to go, but no code to make it work yet.  Once I get a proper enemy to attack I can work on attacks, projectiles, damage, and healing as well.  Then I want to think about how the structure of the game is going to work.  I'm thinking of sort of a belt scroller like Golden Axe, but with a mass of folks behind you acting on your orders and their own volition.

I want to try to use some of the ideas in The Trick I Used to Make Combat Fun! from Game Endeavor here to make Guildie and Enemy behavior more varied and interesting but still reasonably predictable.

Get Guildies

Comments

Log in with itch.io to leave a comment.

Amazing! That asset pack is amazing. I’m a little jealous that I cannot use it as I’ve chosen to learn 3D.

Looking forward to day 2!