DAB0mB/radial-snake

Wrong fps count

Closed this issue · 3 comments

Hello, found this project in reddit.

One logic error I spotted is in game js. In the loop function you are using setTimeout(fn, fps) but fps is 60 so your loop will not run every 16 ms for 60fps) but every 60 ms (17fps)

@andreasgruenh Thank you for submitting this issue! Indeed the refresh rate was not calculated correctly, and I patched it over here: 489b679#diff-ffadca4f8ebdae8ae4da9f6cc17b62d3R14

You should use the fps property in your refresh rate property :P or remove the fps property.

Yes I just changed it :-)