floooh / pacman.c

Simple Pacman clone written in C99.
MIT License
508 stars 44 forks source link

Pacman animation speed too slow #8

Closed MikeDX closed 2 years ago

MikeDX commented 2 years ago

Comparing the animation speed in pacman.c seems to differ to the original by about 50%.

I propose the fix for this to check for the ticks to be increased from /4 to /2 in spr_anim_pacman around line 1139 from

 uint32_t phase = (tick / 4) & 3;

to

 uint32_t phase = (tick / 2) & 3;

This appears to be much closer to the original.

Happy to submit a PR if you wish :)

floooh commented 2 years ago

Hmm, tbh I was just eye-balling it and it might definitely be wrong. Happy to merge a PR :)