Jump to content

mariannoga

Members
  • Content Count

    7
  • Joined

  • Last visited

About mariannoga

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have been playing with my pet project in Phaser3 recently and I tried different things in order to improve performance. Here are some numbers that you might find interesting. As previously it is a tile based scene. The map is an 80x50 tiles each 16x16 pixels. The tests have been done for 2 layers tilemap to keep it simple. I tried few approaches including mapping 2 layer map to a texture and rendering as an ordinary image. It's quite surprising which approach had best performance. Screenshots were off for purists. Update is bailing out if rendered once. Each time rendered image is exact
  2. No, it won't. I can avoid redrawing canvas in update() but the engine still invokes gpu routines to redraw the screen. My update function exits immediately but it won't stop cpu sky rocketing.
  3. Ok then. If these are the answers then I conclude you guys are doing everything fine and I must be asking wrong question. Otherwise every single game in Phaser would be botched. Why is my CPU spiking when the game is not doing anything? Hard to believe it is just due to canvas rendering.
  4. Seriously? Well, that clarifies one thing fps settings are not going to solve the performance problem. Can phaser be instructed not to render the canvas if there was no change?
  5. Thanks for the response. I set the target, min and forceSetTimeOut as instructed. Render seems to be firing every 20ms which would be 50Hz. this simply means it did not work as expected. no change to the CPU usage. thanks for the efforts but I think I will need to try something else. Any other ideas?
  6. Thought you might say more information is needed. I wasn't really sure what is relevant so let me answer your questions. Size is set as follows when opening Electron window: mainWindow = new BrowserWindow({ width: 1200, height: 768, resizable: false }); Then the phaser config takes it as follows: // main game configuration const gameConfig: GameConfig = { width: window.innerWidth, height: window.innerHeight, type: Phaser.AUTO, parent: 'game', scene: MapScene, fps: { target: 2 } }; The map size is (80 tiles x 16 pixels) x (50 tiles x 16 pixels) and that is pretty mu
  7. I have been playing around with phaser3 and electron. I have developed simple 2D tile based map and the code just runs a single scene at the moment. It doesn't even render anything beyond a single frame - my update function inside the Scene get called multiple times a second but exits immediately if there is no update needed. However I can see in Dev Tools' Performance tab that rendering routines get called quite often. It results in unwanted CPU usage and my laptop fan goes through the roof and wakes up my neighbours. It's kinda annoying and I hope somebody can give me an idea about how to im
×
×
  • Create New...