Hey everyone,
I’m just testing out a basic platformer and having issues with player animations and gravity. The sprite rapidly swaps between animations, and the “when not moving” block seems to be the culprit. I’m guessing this is because, with gravity, the sprite is always “moving?”
The only reason for the “when not moving” block is to activate my sprite’s standing frames when it’s not moving. Otherwise, it has a chance stop in the middle of the walking or falling animations.
The jump animation is also stuttery and I’m not sure why. Any help is appreciated.
2 Likes
I think it’s freaking out because some of your animations are different sizes, namely the standing still animation being 12 pixels wide while the falling animation is 13, which causes it to do weird things. I would make sure all of your animations are 13 x 16
As for your jittery jump issue, Makecode handles some hitbox sizes weird, but it also seems like there’s an issue with the extension you’re using. When I made the moving up animation 13 x 16 instead of 12 by 15, the issue was fixed!
@mrbuxton Perhaps you could swap to using the Platformer extension instead of defining everything you want through variables. The extension will help you with the gravity issues. As for the “not moving” state, the platformer extension has that in store for you to. You can paste https://github.com/microsoft/arcade-platformer into the extension searchbar and download it in.
To fix your stuttery sprite frames, check everything and make sure each animation is set to the same frame size. Often times, that’s the problem.
Tell if this works!
CrunchyToast