Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox rendering performance #189

Open
tearmaker opened this issue Sep 10, 2015 · 4 comments
Open

Firefox rendering performance #189

tearmaker opened this issue Sep 10, 2015 · 4 comments

Comments

@tearmaker
Copy link

Hi,
As I add more sprites, am I the only one having ~20fps on Firefox and 60fps on Chrome, IE, Opera ? Is there a solution ?

@ghost
Copy link

ghost commented Sep 10, 2015

No, happens to my version of browser quest, that's why I'm rewriting it all from scratch.

@tearmaker
Copy link
Author

I think replacing the engine by pixi.js or phaser would be perfect and solve the problem. But it's quite a long work.
There is still webgl-2D ( https://github.com/gameclosure/webgl-2d ), that is way easier to plug in the existing browserquest, but it didn't work for me (I didn't try long neither).

@rickguedes
Copy link

According to some Mozilla dev:

I believe this is because the body element has:
background-image: radial-gradient(transparent 40%, rgb(0, 0, 0) 125%), url("http://cdn.mozilla.net/browserquest/img/1/wood.png"), none;

One could also reasonably ask why that background is being repainted all the time, given that it's not changing at all as you play the game.. the game is played in a canvas, so maybe we should cache the background rendering into a layer?

@rickguedes
Copy link

After some tests, it's not related to the gradient at all. It's fault of the awfully optimized desktop renderer (it just cleans and repaint the screen completely every frame without any buffering, a major waste of resources)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants