Help with simplifying a ton of animations

Godot Version

4.3`

Question

This is a top down 2D game.

` So while this deals with animation I think it is more relevant to programming then animations specifically.

So I have a lot of animations, like a lot, and its only going to get harder to manage the more weapons and characters I add. So I’m brainstorming on ways to simplify my workflow and the current idea I have is to group the animations based on direction.

So for example I have a shoot_weapon, reload_weapon, change_weapon animation for EACH of the possible 8 directions. I’m trying to figure out a way to program the game knowing which direction is being pressed and then ONLY having animations of that direction in a list of possible animations. So for example if I’m in the 180 degree direction I was hoping to create something that only has animations in that direction. Maybe even another check to see what weapon is equipped and what direction to really limit the potential animations in the list.

I think making everything a state would work, but I’m not sure how to implement the lists of potential animations. So for example I could make ACTION STATE, MOVEMENT STATE, DIRECTION STATE, WEAPON STATE. Then depending on them all aligning playing the animation.

Anyone have any tips? Ideas? I’m working with probably around 200+ animations per character and would really like it to be clean if possible. Thanks

Quick edit: If anyone more knowledgeable on working with lots of animations has a completely different solution I’m interested in hearing it.

You can use sprite_rotation - I’ve used this in both 8 direction and 360 direction games. The +90 was to work around the original sprite.

choppa_angle = Vector2(velocity.x, velocity.y).angle()
	if velocity.length() > 0:
		$choppa_sprite.rotation_degrees = rad_to_deg(choppa_angle) +90

You can see this in action on my YouTube channel and my itch.io