Jump to content

Full stage background in css or in game. Performance?


lukaMis
 Share

Recommended Posts

Hi

 

In my example image wall and wood in the background will never change. Is it better to set that image via css on canvas parent element and then overlay phaser canvas with transparency over it or have the image as background inside phaser on stage.

 

Does that change even impact performance?

 

tnx 

 

 

post-9057-0-08701900-1441282157.jpg

 

Link to comment
Share on other sites

When I create applications (not games) I usually use a CSS backgroundso I can make my stage size smaller (background in CSS fills whole screen, phaser app is actually just a part of the center of the screen). If your app cover the entire page, then I guess adding a background image won't hurt performance that much, but if you have to scale your game to fit the browser just to add a background image, you better end up using CSS.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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