I'm trying to make a very simple game. I have some programming experience (mostly database and microcontroller programming in C-based languages).
What I'm experiencing is inconsistent sprite playback when input is triggered. When running the game itself, the default idle animation plays at a normal rate, but after the first input, any other animation seems random. Sometimes short, sometimes long. Frequently no animation is triggered at all.
What I have seen is that the idle animation seems ... shifted because there's a noticeable "hiccup" as it cycles through.
The first thing I thought was that animations were being interrupted by input events and causing the state machine in my Animation Tree to maybe look like it's all messed up.
For keyboard input, I have overridden a _input() method and have the event information output info to the console. According to the output, I'm not experiencing multiple keypress spam. So, each keypress is only generating one event.
From there, the player script has already pulled the animation tree and using travel() to start the animation itself. Animations are stored in an Animation Player node. Inside the animation player and the tree, the animations all play correctly.
The tree itself starts with "idle". It is connected to the other animations with an Immediate Switch Mode (with no auto advance). Once the destination animation ends, it is does go back to idle. It's switch mode is AtEnd with Auto Advance.
Aside from the inconsistent playback, everything else is fine.
I know I could probably get away with just Animation Player's play() but I kind of need the animation tree so I don't end up in state hell. Having the tree makes life so much easier because the animations will be linked into longer sequences.
The only other thing I came across was the Dead Zone setting on the Input Map screen. Not entirely sure what it is but the clear documentation for it is difficult to find.
I even threw the project on my NAS and tested on an iMac and get the same results so clearly I'm missing something that is not mentioned in any tutorials have I've seen.
Anyone have any suggestions?