Issue with 8 direction isometric sprite animations

Firstly I’ll say that I’m an artist and not a programmer, so even with a minimal programming development tool like GDevelop I’m a beginner. I apologise for any stupid questions ahead of time.

I have just started a game by first setting up the movements for the player character. I’ve got the 8 directional movement working, and I’ve even got the correct animation playing when movement happens in any given direction.

I don’t know if my logic setup is okay or if it could be improved, but it mostly works. The only thing that doesn’t work is that when I travel diagonally in any direction, the animation usually changes to one of the 4 cardinal directions when I release the keyboard keys.

I don’t have idle animations for all 8 directions (I might consider it, but for now I don’t) so my solution is to the tell the game to set the frame of the currently playing animation to frame 1 and keep it as that still frame until movement happens again. As mentioned, the up, down, left, and right animations stop correctly, but the diagonal ones often don’t. And to make it even more confusing, they sometimes work, but often don’t.

Here are some screenshots of everything I have so far, and a gif of me previewing two movement directions to show the difference.

Let me know if I should add anything else to better communicate the problem, and thank you so much in advance for any help!

I think the issue is that it’s difficult to release 2 keys at the exact same time. So, if you release [up] and [left] then it’s likely on the next frame either [up] or [left] will still be pressed and the animation will be changed.

Unfortunately, I don’t have a fix. But I’m sure some else will. This at least gives you and others a starting point.

That’s really clever, I would not be surprised at all if that was the issue! It would explain why the animations sometimes work correctly and sometimes don’t.

If anyone has any potential fixes I could try, I’m all ears. I will also continue poking around on my own to see if I can stumble upon a solution.

I think I may have a somewhat similar thing I did with a project of mine involving vehicles and stuff. What I did was I created a pointer object. It’s set to be hidden and is set to the position of the vehicle object. When a key is pressed for a certain direction, the pointer snaps to it instantly. As long as the key remains pressed, the vehicle object is set to follow the angle of the pointer but a rotation speed is set for the vehicle so that it doesn’t instantly face that direction. Said vehicle is then given force angle to the direction it is facing. To be fair, I feel like my method is rather messy but it does simulate steering type of movement. Also since the object in your game is a person, you might want to skip the force angle thing and just go with directional movement instead.

In short, it’s set in such a way that facing towards an angle or direction is not instant. I’m not sure if that would work for you and someone might have a better, more elegant solution somewhere, but there you have it. And good luck!

edit: Now that I think about it, I probably didn’t need that pointer object, just some conditions for angle facing and such… yeah, just putting this out there.