Phaser 3 - Performance

Hi, everybody.
Q: my game loads video card by 20-30%. (nothing happens on stage at this point. updates empty) Is that normal?
It works quite fast (60 fps), but loading the GPU are concerned.
p.s. I’m a junior at Phaser. Thanks in advance for any help.

let gameConfig = {
        type: Phaser.AUTO, 
        width: 720,
        height: 1280,
        backgroundColor: 0x222222,
        scene: [preloadAssets, mainMenuScene, playGameScene, selectLevelScene, pauseMenuScene,winMenuScene,loseMenuScene,questMenuScene,hiddenPauseMenuScene,replayMenuScene, createPauseMenuScene, createSettingsMenu, createShopScene]
    };

You seem to be rendering the whole game at 60 FPS, so something is happening. And apparently it’s enough to rise the GPU usage to 30%.
Just because you aren’t doing anything in your code, doesn’t mean Phaser doesn’t have to batch all the sprites and stuff and send it to the gpu, which redraws it, every single frame.
Even empty canvas with nothing on it could cause high GPU usage purely due to clearing the canvas every frame. GPU has to recalculate every pixel.

1 Like

thanks for the reply.
Can I lower the load?

Lower the resolution and/or FPS (which Phaser doesn’t support, although there is a PR for it iirc).

Use Phaser.CANVAS?

i’m sorry, what is PR?

A Pull Request. Concretely this one. https://github.com/photonstorm/phaser/pull/4179

It’s cool :grin:
You’re so helpful !

Hi. You are right, CANVAS greatly reduces the load.