A comprehensive look at the power consumption used by Phaser games and how to reduce it.

Posted on 9th Jul 2021. Follow @phaser_ and get the Phaser World newsletter.


David NĂ©grier writes: "WorkAdventure is a platform that uses, at its core, a video-game engine, to provide a virtual office environment. Because the application is a virtual office, it needs to run 100% of the time, in the background. It is therefore important that the application does not draw too much power (which causes laptops to overheat, battery to drain faster and computers to be less responsive)

Article updated on April, 28th to add impact of canvas resolution on Power consumption and fixing the Game.step method. In this article, I'll describe the steps I went through to reduce the power usage of WorkAdventure. WorkAdventure is based on the Phaser game engine, and is rendering the game using Tilemaps.

Because WorkAdventure uses the "Request Animation Frame" API, the browser is already doing quite a bit of optimization by itself. In particular, the game loop is stopped if the browser window is not visible (this is of course stopping any energy consumption from the engine). What I am interested in is reducing power consumption when the game is visible (either because the application is at the foreground or because the application runs on a secondary monitor...)"

Read More

Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.

The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
  • By Emanuele Feronato
  • 155 Pages
  • 28 Source Code Examples
  • Build a complete game from start to finish
  • Cross Platform
  • Scaling for devices
Buy Now