Performance - GPU usage spikes to 100%

Hello!

I’ve read every topic about performance in this forum, but I haven’t find one that approaches this matter.

I’m using Phaser 3 with typescript and when I start my game (it’s running on a local WAMP server right now) and I try to play it, the GPU usage spikes from 0% to 100% instantly in the first scene (which is just an image with an onclickevent).

The usage of GPU goes from 100% to 0% and from 0% to 100% in a matter of milisecons. As expected, my PC keeps running slower and the only way to solve the problem is by closing the game window in my browser or killing the process.

To be honest, at this moment I don’t know if this problem is due a Google’s Chrome Bug or it’s due Phaser. Do you have any ideas?? I can’t really develop a game and enjoy this sweet framework with this lag :slight_smile:

By the way, the FPS of the game are ok, about 80fps, but the rest of my computer “explodes”.
My GPU is a GTX 940mx.

Thanks!

1 Like

More informations are required here.
Are the Phaser 3 Examples working fine without a jump of the GPU usage? Are you using the latest Google Chrome Version? Have you tried to run the example in another browser?

EDIT: Have you tried to use Phaser.CANVAS in the game configuration?

1 Like

Hello!

Thank you for anwering.

Are the Phaser 3 Examples working fine without a jump of the GPU usage?
Nope. Since I’m using Phaser 3 Typescript, I downloaded this example: GitHub - yandeu/phaser3-typescript-platformer-example: Phaser 3 TypeScript Platformer Example
It’s GPU usage is above 90%

Are you using the latest Google Chrome Version?
Yes (betas not included), I’m using 98.0.4758.102

Have you tried to run the example in another browser?
I just tried using Edge. GPU usage drops from 100% to 60%, which is a big improvement but probably it’s a lot of GPU usage.

Have you tried to use Phaser.CANVAS in the game configuration?
I just tried it. The GPU usage dropped from 100% to 60% in Chrome. Just like the previous point, another BIG improvement, but probably it’s still a lot of GPU usage.
CANVAS in Edge didn’t make a difference.

Hello!

I just improved the performance of my game from 100% to 10-15%. I did the following:

  • Limited the fps of the game to 30. Added in config:
fps: {
    target: 30,
    forceSetTimeOut: true
}
  • Put Phaser.CANVAS as renderer.

I improved it to 5-10% by reducing the game resolution from 1980x1080 to 1280x720, but I’m gonna go with my original resolution until I perform more tests.

Have a nice day!