PyGamer issue

I have created a small game following the “How to make a Platformer Game” tutorials, its been a blast! Unfortunately when I upload it to my PyGamer it seems to skip a frame. I can tell because my 2 frame walk animation doesn’t play on the PyGamer, and it certainly is much choppier than when I am in Makecode in chrome. Any help is appreciated, link to game: https://makecode.com/_V12fC75e7Upb thnx

Hi, the game looks fun! I’ve taken a quick look at the code, and it looks like the walk cycle is defined by selecting the appropriate sprite within an “on game update” block. Every time the block is triggered, it first sets the sprite to the default “idle” sprite, which I believe is resulting in the walk animation not quite looking like you want it to.

There’s two things you could do - move the first “set sprite image” instruction to within one of the nested IF blocks so that it is not executed every time. Maybe an even faster option would be to move the walk animation to a separate routine that runs only “on right/left button press” (the mid-air sprites could still remain within the game update block).

Thanks for your response, the animation looks great in my browser but its on my Pygamer where it fails and the whole game seems to drop its frame rate. Ive tried other game on my PyGamer and they work great. I am just curious as to why. Appreciate the code suggestions!