Jump to content

CPU usage when scaling background sprite


Mike22
 Share

Recommended Posts

I have a simple game with less than 10 sprites. I'm using CANVAS rendering.

 

The problem is, when I add a backdrop and scale it to fit whole screen(by doing on the sprite : bg.width = game.width), the CPU usage grow from 8% to 30% and keep there....

 

I'm wondering if this is because maybe Phaser is scaling on each frame ? What can I do to avoid this CPU usage ?

 

Thank you

Link to comment
Share on other sites

Thanks for the interesting article on RAM usage with images.

 

Unfortunately, my problem is not RAM but CPU.

RAM usage is perfectly normal and fine. The problem is : when I scale the bg (800x600 sprite) to fullscreen, CPU usage start going crazy... Even if the game is doing nothing, and have only 6 other sprites (200x200).

 

To this day I still have no solution. I tried with the latest phaser version but it's the same.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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