ChubbRck Posted May 27, 2014 Share Posted May 27, 2014 Here's a dilly of a pickle I'm having... I'm using CANVAS as my renderer. The game I'm building works great on Chrome but on Firefox, specifically for OSX, I'm having issues. For instance, a 4GB RAM Intel Core i3 PC running Firefox runs great but a 8GB RAM Intel Core i5 Macbook Pro running Firefox runs laggy... I've tried switching to bitmap fonts and reduce other expensive operations but still... Is there any one who has experienced this or who knows what's going on? (Please spare me the 'PCs are better' jokes ) Nick Link to comment Share on other sites More sharing options...
oliversb Posted May 27, 2014 Share Posted May 27, 2014 What is the performance like if you run the Windows version of Firefox under Wine. http://www.winehq.org Also, would you mind putting your code up for public viewing? Link to comment Share on other sites More sharing options...
ChubbRck Posted May 27, 2014 Author Share Posted May 27, 2014 Hi Oliver, thanks for your response. Unfortunately, I don't have access to the laptops right now to install wine and to check but I imagine performance would be good as the game runs great in a PC with Firefox and half the RAM / lesser specs. As for pasting my code, I am happy to do so, but I am not sure what relevant parts to post as the whole code is quite long (~1200 lines). In my update loop I'm generally: Checking for window resize and resizing scale accordinglyManually animating background clouds across the screen per frameCalculating the chance of firing an 'enemy' and creating one if necessaryUpdating the game timer and score display (using bitmap text)Checking for user inputUpdating player positionIs there a part of the update loop that you would like me to show specifically? Nick Link to comment Share on other sites More sharing options...
oliversb Posted May 27, 2014 Share Posted May 27, 2014 Hi Oliver, thanks for your response. Unfortunately, I don't have access to the laptops right now to install wine and to check but I imagine performance would be good as the game runs great in a PC with Firefox and half the RAM / lesser specs. As for pasting my code, I am happy to do so, but I am not sure what relevant parts to post as the whole code is quite long (~1200 lines). In my update loop I'm generally: Checking for window resize and resizing scale accordinglyManually animating background clouds across the screen per frameCalculating the chance of firing an 'enemy' and creating one if necessaryUpdating the game timer and score display (using bitmap text)Checking for user inputUpdating player positionIs there a part of the update loop that you would like me to show specifically? NickIf I am honest. I most likely won't be one of the people who can help you out but there may be some people on this forum who can help. I advise you upload your project to Dropbox or somewhere that lets you quickly host stuff. I am guilty of not posting my code now and again on coding forums. Don't worry about how much code you have. In this case it seems important that people can see your code. BUT it might be your computer that has a problem and the code might work well. It sounds like that might be the case because it does not apply to PC Firefox or Chrome. It would be nice if you could get somebody else to test it on there Mac. Hope this might help Link to comment Share on other sites More sharing options...
ericjbasti Posted May 28, 2014 Share Posted May 28, 2014 I know this won't be of much help, but Firefox on the Mac has never been canvas friendly (2d context at least). All my stress tests have shown it to be by far the slowest. When Chrome can render 8000 sprites on a screen, expect Firefox to handle 1000 (at 30fps). However since you're using Phaser, and Phaser uses Pixi.js you should be getting the 3d context (webgl)... see if construct2 has the same issue on your machine: http://www.scirra.com/demos/c2/sbperftest/When I run that demo, I get ~60fps in Firefox (2007 iMac). oliversb 1 Link to comment Share on other sites More sharing options...
agmcleod Posted May 28, 2014 Share Posted May 28, 2014 Have to agree with Eric. I've noticed slower framerate on average with firefox on OS X. More recently it has gotten better in the game i'm working on, just using a canvas 2d engine. Link to comment Share on other sites More sharing options...
ChubbRck Posted May 28, 2014 Author Share Posted May 28, 2014 Thanks for your help, guys - glad to hear I'm not going crazy. I've switched to WebGL for Firefox which has alleviated the problem somewhat. Thanks again - Link to comment Share on other sites More sharing options...
Recommended Posts