maseide Posted November 6, 2013 Share Posted November 6, 2013 Hi,This is my first post here, happy to join! :-) I'm developing a small runner game, and I'm experiencing different performance problems in different browsers. Any hints, tips, suggestions on how to solve them are very welcome! My unfinished game is here: EDIT: URL REMOVED It runs very smooth on Chrome (I'm using a 2011 MacBookPro).In Firefox, it starts very well after load, but soon it slows down, and sometimes it speeds up again at random (?) places.In Safari it's quite slow from the start.In Mobile Safari (ipad3 and iphone5) I get about the same speed, or even better, compared to Safari on the MacBookPro. I've tried doing browser profiling in Chrome, Firefox and Safari, but I'm kind of confused. It may look like the bottleneck on Firefox is the canvas rendering, but I cant explain the variations in speed over time. And I really can't see why there should be rendering problems at all on a laptop in this case. Any ideas? Best regards,Peter Quote Link to comment Share on other sites More sharing options...
Psychho Posted November 6, 2013 Share Posted November 6, 2013 Are you using delta timing to keep physics consistent with frame-rate? Quote Link to comment Share on other sites More sharing options...
maseide Posted November 6, 2013 Author Share Posted November 6, 2013 No. In this case I use a fixed update timer. Delta timing may even the perceived speed differences between browsers, but won't solve the underlying performance problem here. Quote Link to comment Share on other sites More sharing options...
maseide Posted November 15, 2013 Author Share Posted November 15, 2013 I finally solved the problem, and of course it had a stupid reason: The millisecond parameter in setInterval was by some reason an undefined value. Setting it to a defined value helped a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.