Closed unknwnc closed 9 years ago
Ok. One thing that can help us is a read out of the FPS. And my game library has that built in. I'll try to get that going tonight.
I just added a FPS display. Please let me know what kind of FPS your getting. Also is the ball slowing down during lag time. If so that is something else to address.
https://github.com/zachdyer/pong/commit/a8f8fef68be31b81989052255f07f2fe267987d9
I made the ball move per second instead of per tick so it will move at a consistent speed no matter what the fps is.
https://github.com/zachdyer/pong/commit/11a3412b3909391de624d9b764abf0a805da1248
Also some are two big to update a giant canvas full of graphics. So maybe eventually limiting that will help.
Just a possible consideration. Chrome dev tools shows me wavering around 30FPS, but then again, I don't know if running dev tools could impact performance. My computer scored 11273 on Google Octane, so it's definitely not the most powerful machine, but then again; this is Pong... I personally think that this should be running faster, but I have no idea where to look first or what to try to improve, so I'm just throwing this idea up here for consideration.