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