Jump to content

Seizing control of cross-browser performance


Recommended Posts

I would like my game to perform identically in all browsers.

Yes, I know that is impossible, but I can make an effort to get similar speed/performance between FF, Chrome and IE at least.  I have noticed big differences between browsers for my game so far.  Chrome is best, nice and fast.  IE is second fastest, then FF is noticeably slow and laggy.


So I am thinking I could seize control of the performance by having update() run only every X milliseconds - the same on all browsers - to gain a similar level across each.  Of course this might limit performance unfairly on better browsers, but then again it would give a level playing field, so to speak.


What I am thinking is that I could put something like this in my code:

var MX = 50; // milliseconds delay between each update() iterationfunction update() {    game.time.events.add(MX, function () {     //    // (rest of update function goes here)    //   },this);}

So I'm just after some opinions really... Is this a good thing to do?  Should one limit the performance to keep it similar across different clients?  Or should I just allow it to run as fast as it can in whatever browser is used.... And accept that some are slower/faster than others?


Or is there perhaps some general tips for improving performance in Firefox?   (Everything is great in Chrome!).






Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...