Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Today was kind of productive. I was able to implement movement and figure out how to use a walking animation. There were some...bumps along the way. 

My first attempt was a spectacular failure. I tried to use a simple walking down animation, using godot AnimationPlayer and the spritesheet's region rect as the keyframes.

I later found the sprite animation tool under the sprite node and it was much easier to work with, but I also figured out a way to do it via rect as well.

This was great, so I tried to plug the animations into movement in game with...mixed results

The problem here is that the program was trying to start the walking animation as long as velocity > 0, so it didn't move onto the next frame until velocity = 0. I was able to fix this by a series of 'if' statements supported by strings which checked if the walking animation for a respective direction was already playing before trying to play it (again)

What I failed to realize was that my character has to follow the mouse all the time, so most of this was a waste of time lol. Regardless, I learned some important things. Another problem was that in order for my character to smoothly follow the mouse I'd need sprites for at least 8 directions. So I opened up graphicsgale and made my first sprites ever! 


Next up I need to figure out how to rotate the character to face the mouse. The hardest part will be figuring out at which angle the sprite needs to rotate. Animation based on that rotation will be very difficult, I probably won't have animation for diagonal movement (maybe as a stretch goal), but I can reverse the animations if the player is walking away from the cursor which should work fine for the cardinal directions.


Until next time!