With a lot of trial error, I was able to finally get the cat using the correct directional sprites for sitting and walking. I’m so proud of my progress today!
Couple of key insights that slipped past me for way too long. When you are in the sprite frames editor, you can select whether an animation loops for individual keys. It is this button:

Blue means on / White means off. You set it to OFF for all of the sitting animations, then they’ll play once and the cat will stay on the last frame of the sit animation. Also, I refactored the code that handles picking the animation to be generic to the direction and action so that I don’t have to copy/paste code. Also, I simplified the code that calculates the compass direction after reading the Vector2 directions. A vector of (1,0) in the game is facing east. West is (-1,0), North is (-1,-1) and so on. Once I understood this, the calculations for the compass direction were much simpler.
What I want to work on next is reintroducing the ability for the cat to visit the cat bed, litter box, etc. with the new cat sprite animations. In addition, I kind of want to do the following things:
- Make it so that if you hit space bar, the AI picks a new destination
- Make it so that you can spawn multiple cats (refactor code to make each cat independent)
- Add a scratching post that the cat can play with
- Make it possible to put Houdini in the game
- Start adding the ability for it to react to tips (i.e. start on the networking)
I’m so excited by my progress – I can’t wait to work on this some more tomorrow!